feat(prompts): subagent fleet doctrine — evidence + git discipline - #6
Merged
Conversation
added 2 commits
July 21, 2026 12:21
…hared-checkout git discipline Two injection points, prompted by 2026-07-21 fleet collisions (staged-index sweep, branch-from-moved-HEAD, web-UI conflict resolution silently dropping a merged PR's entire diff): 1. delegate_tool._build_child_system_prompt: new 'Honesty and evidence' block (self-reports must cite observable evidence; side-effecting ops need verifiable handles; 'cannot verify' beats fabricated certainty) and 'Git discipline in shared checkouts' block (verify HEAD first, isolate via worktree/branch, explicit-path add+commit immediately, never leave staged state, restore checkout on exit). 2. prompt_builder.KANBAN_GUIDANCE: new 'Shared-checkout git discipline' section for kanban workers (same rules + never web-UI conflict resolution — a resolution is a code change; leave checkout on main so nightly automation isn't broken). Tests: tests/agent/test_prompt_builder.py (166) + 6 delegate suites (212) all pass.
…ection The subagent fleet doctrine PR adds a 'Shared-checkout git discipline' section to KANBAN_GUIDANCE, growing it from under 5_500 to 6_783 chars. The bound test's docstring already states the ceiling guards against unbounded growth, not any growth — raise it to 8_000 to fit the new intended content with ~18% headroom.
girnarholdings
force-pushed
the
feat/subagent-fleet-doctrine
branch
from
July 21, 2026 16:22
d9397fe to
def8e6e
Compare
girnarholdings
pushed a commit
that referenced
this pull request
Aug 3, 2026
…view #6) The fail-fast admission path (bounded compress pool, F6) only logged a WARNING; in the compression-attempt telemetry stream a wedged pool looked like compression simply stopped being attempted. Emit the existing attempt telemetry with failure_class='pool_saturated' (commit_status=aborted, split_status=aborted) on refusal, following _emit_compression_attempt_telemetry's existing call shape. Regression extends the F6 saturation test (sabotage-verified).
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.
Prompt-level hardening at the two injection points every subagent/worker reads, from the 2026-07-21 fleet collisions:
delegate_tool._build_child_system_prompt: 'Honesty and evidence' block (every completion claim cites a command/artifact/exit code; side-effecting ops require a verifiable handle; 'cannot verify' > fabricated certainty) + 'Git discipline in shared checkouts' (verify HEAD, isolate via worktree/branch, explicit-path add+commit, never leave staged state, restore checkout).prompt_builder.KANBAN_GUIDANCE: 'Shared-checkout git discipline' section for kanban workers — same rules plus: never resolve conflicts via GitHub web UI (a resolution is a code change), leave shared checkouts on main with a clean tree (nightly automation requires it).Verified the assembled prompts render real newlines (no literal escapes), both files parse, and 378 tests pass (166 prompt_builder + 212 delegate). This is fork commit #8 — the nightly auto-sync picks it into
auto-sync/integrationon the next rebase.