fix(agents): decouple the delegation duty from hard rule 1's write exception - #25
Merged
Merged
Conversation
…ception Upstream commit a24eac1 (PR kunchenguid#1272) rewrote section 1's delegation sentence from an absolute rule into one gated on hard rule 1's captain-approved project operation exception. That commit's message is entirely about write permission and never mentions delegation, so a rule about whether firstmate may write became the only boundary on whether firstmate must delegate, with no bound on magnitude. Restore the unconditional delegation duty and let the exception license writing only. State the reason the rule exists - delegating is what keeps firstmate reachable - so the rule carries a cost the way the direct-path rule does. Disambiguate the direct-path sentence, which means "do not build machinery" but reads as "do not add indirection", by naming delegation as not machinery. Per the captain's explicit ruling, the proposed one-project and few-minutes bound is deliberately omitted; the escalation trigger is grounded in the availability rationale instead of a project count or a clock. Hard rule 1's own text is unchanged and byte-identical to the base.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
On 2026-08-19 the primary firstmate personally executed a branch prune across ten repositories instead of delegating it. The investigation traced the cause to upstream commit
a24eac1(2026-07-29, PR kunchenguid#1272), which rewroteAGENTS.mdsection 1's delegation sentence from an absolute rule into one gated on hard rule 1's captain-approved project-operation exception.That commit's own message is entirely about write permission and never mentions delegation. The effect was that a rule about whether firstmate may write became the only boundary on whether firstmate must delegate, with no bound on magnitude. This is inherited from upstream rather than fork-local, and is fixed here in the fork.
Two factors compounded it. No rule anywhere in
AGENTS.mdstated what delegating is for, and a rule with no stated cost loses to a rule that has one. Section 7's "simplest direct end-to-end path" instruction has one, and although it means "do not build machinery" it reads as "do not add indirection" - and delegation is indirection.Change 1 - decouple the delegation duty from the write exception
Section 1, before:
After:
The duty to delegate is now unconditional. The exception licenses writing, not not-delegating.
The one-project bound was omitted at the captain's instruction
The investigation's proposed wording also included the clause "and it never covers work spanning more than one project or more than a few minutes". The captain reviewed both variants and explicitly chose "decouple delegation from the exception, but do not add the one-project bound".
That clause is therefore deliberately absent from this change, at the captain's instruction. The change carries no project-count and no duration bound. The escalation trigger is grounded in the availability rationale instead: an approved operation gets briefed and spawned when running it would keep firstmate from answering the captain.
Change 2 - state why the rule exists
The rationale is now the second line of section 1, immediately after the "only point of contact" line:
The substance of the proposal, drawn from firstmate's own Grok Bot doctrine, is preserved: availability is the reason, and self-executed work is what costs it. The two halves are joined so the sentence carries the cost in the same breath as the rule.
Change 3 - disambiguate the direct-path sentence
Section 7, before:
After:
Sites changed: 1. A repo-wide search for the sentence and its close variants (
simplest direct,control planes,policy layers,added machinery) acrossAGENTS.md,.agents/skills/, publicskills/,bin/, anddocs/returns this one location only. The near-identical line in the captain's personal global instructions lives outside this repository and is out of scope here.Out of scope, verified unchanged
Only
AGENTS.mdis touched, 7 insertions and 3 deletions, so the change is close to net-neutral as the file's size discipline requires.Verification
Hard rule 1 hashed at the merge base and at HEAD, plus the acceptance greps:
git diff --stat fork/main HEADis a single file:Test suite
Full local suite run on the change:
No test needed modification. This change edits prose only and alters no structure or documentation-audience mapping that the suite asserts on. Four scripts failed, and each was individually investigated and attributed to a cause other than this change:
1 and 2 -
tests/fm-lint-workflows.test.shandtests/fm-lint.test.sh: missing local actionlint. Both fail with exit 127,fm-lint-workflows.sh: actionlint not found; install actionlint 1.7.12 for CI parity.The pinned actionlint is not installed on this machine; ShellCheck 0.11.0 is present and passed. Nothing was installed system-wide to chase them. These pass in CI, which installs actionlint. This change touches no shell script and no workflow file, so it cannot affect either.3 -
tests/fm-backend-herdr-presentation-e2e.test.sh: load-induced, not merge-introduced. The failing assertion is "concurrent secondmate recovery failed ... error: herdr presentation recovery could not acquire its session lock; refusing a concurrent resume". Re-run standalone on this branch it passes:FM_TEST_SUMMARY total=1 failed=0 duration_ms=285069. The cause is a timing bound rather than a defect in the change under test:spawn_herdr_presentation_order_lock_acquireinbin/fm-spawn.shretries 50 times at 0.1s, so it gives up after 5 seconds, while the concurrent peer holds the lock across a full recovery. Under whole-suite load that bound is exceeded.It is also not a regression introduced by the upstream sync. The only change to
bin/fm-spawn.shbetween the pre-merge base6a90309and this branch is PR #23's relaunch-placement block, which is gated onRELAUNCH_ENDPOINT_MISSINGand does not touch the presentation lock or the concurrent-recovery path that failed. The failing code path is identical on both sides of the merge. The herdr identity scrub is not implicated either: the test sets its ownHERDR_SESSIONfrom the lab helper and callsherdr_forget_inherited_panefirst, so it is self-isolating.4 -
tests/fm-wake-queue.test.sh: pre-existing, reproduces without this commit. It fails on "the oversized unread status line was truncated or omitted", preceded bygrep: out of memory. This one is not a load artifact - it reproduces standalone at low load. It was then run onfork/mainwith this commit absent and failed identically, same assertion and samegrep: out of memory. It is therefore pre-existing on main and unrelated to this change, and is left for separate triage rather than widened into this PR.Base
Rebased onto current
fork/main(699b14a), which carries the upstream sync from PR #21 and PR #22, so the diff against main is this one commit.