-
Notifications
You must be signed in to change notification settings - Fork 0
Add night-ops-directive and coderabbit-pr-gate skills #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
48fa676
8b7b3cd
a8b99f2
1e917ec
8c8d912
527a5d3
61532ff
a9616b5
92e52e6
bdee128
61b1ea2
8fc743f
ee07a2e
3429e03
b0cdd76
041bbb3
deb22ed
c905f60
90407ee
52e35e3
1aecf54
768e473
c9e8dd9
3e33d78
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| --- | ||
| name: coderabbit-pr-gate | ||
| description: >- | ||
| Agent-only policy for reacting to CodeRabbit's PR review advice, beyond a bare pass/fail | ||
| check, and for handling CodeRabbit's rate-limiting without treating it as review failure. | ||
| Load before treating a public registered repo's PR as ready to merge or teardown when | ||
| CodeRabbit is enabled on it, and whenever a CodeRabbit review comment or rate-limit response | ||
| needs a reaction. | ||
| user-invocable: false | ||
| metadata: | ||
| internal: true | ||
| --- | ||
|
|
||
| # CodeRabbit review-gate routine | ||
|
|
||
| This skill applies to every public registered repo with CodeRabbit enabled. It covers reacting | ||
| to CodeRabbit's actual review content, not just whether its check reports pass or fail. | ||
|
|
||
| ## Policy | ||
|
|
||
| A green CodeRabbit check is necessary but not sufficient: CodeRabbit can pass a PR while still | ||
| leaving actionable suggestion comments (bugs, security notes, missed edge cases) that a bare | ||
| status check does not surface. Before treating a PR as merge-ready on a CodeRabbit-enabled repo: | ||
|
|
||
| 1. Read CodeRabbit's review comments on the PR (via `gh-axi`), not just its check conclusion. | ||
| 2. Classify each comment: a genuine actionable finding (correctness, security, a real bug) versus | ||
| style-only or already-addressed noise. | ||
| 3. Route actionable findings the same way any other review finding is routed under section 7 and | ||
| `ask-user-authority`: a routine, reversible fix within accepted task criteria is autonomous | ||
| under `yolo`; anything that would expand scope, or is destructive, irreversible, or | ||
| security-sensitive, escalates to the captain as a decision rather than being silently applied | ||
| or silently ignored. | ||
| 4. Do not merge past an unresolved actionable CodeRabbit finding without either fixing it or | ||
| getting an explicit captain or `yolo`-authorized decision to proceed anyway. | ||
|
|
||
| ## Rate-limit handling | ||
|
|
||
| CodeRabbit rate-limits review requests on busy repos or accounts. A rate-limited or | ||
| not-yet-reviewed state is not a failure and not silence to route around: | ||
|
|
||
| - Treat a CodeRabbit rate-limit or pending-review response as a `paused:`-class external wait | ||
| (section 8's distinction between `paused:` and `blocked:`), not a `blocked:` or `failed:` one. | ||
| - Re-check on a bounded backoff rather than polling tightly or repeatedly re-requesting a review, | ||
| which extends the rate limit; let the watcher's own wake cadence carry the recheck instead of | ||
| arming a dedicated poll loop for it. | ||
| - If CodeRabbit still has not produced a review after a reasonable number of backoff cycles, | ||
| do not block merge readiness on it indefinitely - report the stalled review to the captain as | ||
| evidence rather than silently merging without it or silently waiting forever. | ||
| - Never spam re-requests at CodeRabbit to work around a rate limit; that worsens the limit for | ||
| every repo sharing the account. | ||
|
|
||
| ## Scope | ||
|
|
||
| Applies to every public registered repo, including non-owned repos dispatched to via a fork | ||
| (see `AGENTS.md` section 7 and `night-ops-directive`). A private or `local-only` project without | ||
| CodeRabbit enabled is unaffected; this routine only activates where CodeRabbit review is live. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| --- | ||
| name: herdr-navigation | ||
| description: Herdr workspace navigation for agents — how to find your own pane, open panes in a direction, and read or send to other panes. | ||
| user-invocable: false | ||
| metadata: | ||
| internal: true | ||
| --- | ||
|
|
||
| # herdr-navigation | ||
|
|
||
| You are running inside a herdr pane. Your pane ID is in the environment as `$HERDR_PANE_ID`. This skill covers how to navigate, open new panes, and interact with neighboring panes. | ||
|
|
||
| ## Your own position | ||
|
|
||
| ```bash | ||
| # Who am I? | ||
| herdr pane current --current | ||
|
|
||
| # Get full layout context (your position in the workspace grid) | ||
| herdr pane layout --current | ||
| ``` | ||
|
|
||
| Your pane ID is also available as `$HERDR_PANE_ID` (injected by fm-spawn). Use either. | ||
|
|
||
| ## Open a pane relative to yourself | ||
|
|
||
| ```bash | ||
| # Split to the right (new pane appears to your right) | ||
| herdr pane split --current --direction right | ||
|
|
||
| # Split below (new pane appears below you) | ||
| herdr pane split --current --direction down | ||
|
|
||
| # Split with a specific command running in the new pane | ||
| herdr pane split --current --direction right --cwd "$PWD" | ||
|
|
||
| # Split and focus the new pane | ||
| herdr pane split --current --direction right --focus | ||
| ``` | ||
|
|
||
| ## Find neighboring panes | ||
|
|
||
| ```bash | ||
| # What's to my right? | ||
| herdr pane neighbor --direction right --current | ||
|
|
||
| # What's below me? | ||
| herdr pane neighbor --direction down --current | ||
|
|
||
| # What's to my left? | ||
| herdr pane neighbor --direction left --current | ||
| ``` | ||
|
|
||
| `neighbor` returns the neighbor's pane ID if one exists, or an error if the edge is empty. | ||
|
|
||
| ## Read another pane's content | ||
|
|
||
| ```bash | ||
| # Read the last 20 lines of a neighboring pane | ||
| NEIGHBOR=$(herdr pane neighbor --direction right --current --json | jq -r '.pane_id') | ||
| herdr pane read "$NEIGHBOR" --lines 20 | ||
| ``` | ||
|
|
||
| ## Send text or keys to another pane | ||
|
|
||
| ```bash | ||
| # Send a command to run in a neighboring pane | ||
| herdr pane send-text "$NEIGHBOR" "echo hello" | ||
|
|
||
| # Send a key sequence | ||
| herdr pane send-keys "$NEIGHBOR" Enter | ||
| ``` | ||
|
|
||
| ## List all panes in your workspace | ||
|
|
||
| ```bash | ||
| herdr pane list --workspace "$HERDR_WORKSPACE_ID" | ||
| ``` | ||
|
|
||
| ## Move yourself to a new tab | ||
|
|
||
| ```bash | ||
| # Move this pane to a new tab (opens it as the only pane in a fresh tab) | ||
| herdr pane move "$HERDR_PANE_ID" --new-tab --label "my-work" | ||
| ``` | ||
|
|
||
| ## Rules | ||
|
|
||
| - Always use `--current` (or `$HERDR_PANE_ID`) rather than hardcoding a pane ID — your ID is stable for your session but not across respawns. | ||
| - `herdr pane split` creates a NEW shell in the new pane; the new pane is empty until you send it commands or run it with `--cwd`. | ||
| - If `herdr` is not on PATH, check `~/.local/bin/herdr` or ask firstmate. |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,66 @@ | ||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
| name: night-ops-directive | ||||||||||||||||||||||||||
| description: >- | ||||||||||||||||||||||||||
| Agent-only policy for a captain-authorized autonomous work session across a federated task | ||||||||||||||||||||||||||
| store or backlog with no captain present to answer routine questions. | ||||||||||||||||||||||||||
| Load when the captain authorizes autonomous, unattended, or overnight work across a backlog | ||||||||||||||||||||||||||
| or federated task store, or when reconciling that a standing autonomous-dispatch directive | ||||||||||||||||||||||||||
| is still active. | ||||||||||||||||||||||||||
| user-invocable: false | ||||||||||||||||||||||||||
| metadata: | ||||||||||||||||||||||||||
| internal: true | ||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Autonomous overnight dispatch | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| This skill is the standing policy for a captain-authorized stretch of unattended work: work | ||||||||||||||||||||||||||
| through a federated task store or backlog without pausing for questions that section 7's | ||||||||||||||||||||||||||
| `yolo` authority already answers, and without collapsing into hands-on implementation. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Standing directive | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - Firstmate stays a delegator for the whole session, including overnight: read state, decide | ||||||||||||||||||||||||||
| routing, write briefs, spawn crewmates, supervise, and report; do not personally hand-edit | ||||||||||||||||||||||||||
| project files, grind through binary or database debugging, or `git diff` a project clone to | ||||||||||||||||||||||||||
| do a crewmate's job. If a bounded, low-risk edit to firstmate's own shared tracked material | ||||||||||||||||||||||||||
| is genuinely faster to author directly than to brief, treat that as the exception, not the norm. | ||||||||||||||||||||||||||
|
Comment on lines
+22
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win Restrict direct edits to shared firstmate material. The exception allows firstmate to edit shared tracked material whenever a direct edit is faster. It does not require an empty fleet or Proposed wording- If a bounded, low-risk edit to firstmate's own shared tracked material
- is genuinely faster to author directly than to brief, treat that as the
- exception, not the norm.
+ Direct edits to firstmate's shared tracked material are allowed only when
+ the fleet is empty. For a ship task that touches this material, load
+ `firstmate-coding-guidelines` before editing; otherwise delegate the change
+ to a crewmate.As per coding guidelines, direct edits require an empty fleet, and ship tasks require 📝 Committable suggestion
Suggested change
🧰 Tools🪛 SkillSpector (2.4.4)[error] 14: [RA1] Self-Modification: Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors. Remediation: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime. (Rogue Agent (RA1)) 🤖 Prompt for AI AgentsSource: Coding guidelines |
||||||||||||||||||||||||||
| - Prefer stacked PRs for multi-step work over delaying a wave of dispatch; do not hold otherwise | ||||||||||||||||||||||||||
| ready work waiting for an unrelated PR to land unless section 7's serialization test is met. | ||||||||||||||||||||||||||
| - Firstmate owns its own wake cadence for this directive. `ScheduleWakeup` and `CronCreate` are | ||||||||||||||||||||||||||
| blocked for the primary session by `bin/fm-subagent-pretool-check.sh`; do not attempt either. | ||||||||||||||||||||||||||
| The watcher heartbeat (`bin/fm-watch.sh`, `FM_HEARTBEAT` default 600s, doubling per idle | ||||||||||||||||||||||||||
| heartbeat up to `FM_HEARTBEAT_MAX` default 7200s, resetting on any actionable wake) is the | ||||||||||||||||||||||||||
| durable wake mechanism and needs no separate timer. | ||||||||||||||||||||||||||
| - Infra and migration work discovered in the task store is in scope for this directive; do not | ||||||||||||||||||||||||||
| gate it away as out-of-scope by default. | ||||||||||||||||||||||||||
| - On a project whose default branch is not captain-writable, push and open the PR from the | ||||||||||||||||||||||||||
| captain's own fork per section 7; never push a branch to the upstream owner's remote. | ||||||||||||||||||||||||||
| - Pace dispatch waves against CI and review-bot rate limits (see `coderabbit-pr-gate` for the | ||||||||||||||||||||||||||
| CodeRabbit-specific reaction routine) rather than firing every ready item at once. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Yolo scope for this directive | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Section 7's `yolo` redefinition applies: the qualifying test for a routine `yolo`-covered gate, | ||||||||||||||||||||||||||
| including a PR merge, is reversibility - can it be undone if it turns out wrong. This directive | ||||||||||||||||||||||||||
| does not expand `yolo` past section 7's boundaries: destructive, irreversible, and | ||||||||||||||||||||||||||
| security-sensitive choices remain captain-only regardless of how autonomous the session is. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Human-only task triage and the promotion path | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| A federated task-store item that names a physical, financial, credential, interpersonal, or | ||||||||||||||||||||||||||
| otherwise non-code action is not crewmate work. Route it to a dedicated human-tasks-only | ||||||||||||||||||||||||||
| federated store rather than leaving it mixed into the code-mappable backlog or attempting to | ||||||||||||||||||||||||||
| work it. Move a qualifying item with `bd transfer <id> <human-tasks-store>` (not `bd promote`, | ||||||||||||||||||||||||||
| which only promotes a wisp to a permanent bead within the same store); `bd transfer` closes the | ||||||||||||||||||||||||||
| source row with a pointer to the destination, creates the new row in the destination store, and | ||||||||||||||||||||||||||
| links the two with a `supersedes` edge so the move stays queryable from either side. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| If the destination human-tasks store is not yet functional, do not hand-debug its provisioning | ||||||||||||||||||||||||||
| personally beyond one bounded verification attempt; file the blocker as a backlog item and keep | ||||||||||||||||||||||||||
| triaging code-mappable work through the normal task lifecycle instead. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ## Session-boundary notes | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| This directive persists across restarts because it lives in tracked `AGENTS.md` and this skill, | ||||||||||||||||||||||||||
| not in conversation memory. A restart mid-directive is a non-event: reconcile fleet state per | ||||||||||||||||||||||||||
| section 5 and resume dispatch, it does not require the captain to re-issue the directive. | ||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Constrain the
yoloexception to the documented authority boundary.Lines 29-32 require captain escalation for security-sensitive actions. Line 34 also permits a
yolo-authorized merge past an unresolved actionable finding without repeating the routine, reversible, and in-scope conditions. This can bypass the security-sensitive escalation rule.Limit the exception to a standing
yoloposture for a routine, reversible merge within accepted task criteria.Based on the PR objective, reversibility is the
yoloqualification for routine gates, including PR merges.Proposed policy change
📝 Committable suggestion
🧰 Tools
🪛 SkillSpector (2.4.4)
[info] 30: [EA3] Scope Creep: Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.
Remediation: Limit the skill's scope to its documented purpose. Remove instructions that enable the agent to perform actions outside its stated functionality.
(Excessive Agency (EA3))
🤖 Prompt for AI Agents