Skip to content

feat(prompts): subagent fleet doctrine — evidence + git discipline - #6

Merged
girnarholdings merged 2 commits into
mainfrom
feat/subagent-fleet-doctrine
Jul 21, 2026
Merged

feat(prompts): subagent fleet doctrine — evidence + git discipline#6
girnarholdings merged 2 commits into
mainfrom
feat/subagent-fleet-doctrine

Conversation

@girnarholdings

Copy link
Copy Markdown
Owner

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/integration on the next rebase.

nima 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
girnarholdings force-pushed the feat/subagent-fleet-doctrine branch from d9397fe to def8e6e Compare July 21, 2026 16:22
@girnarholdings
girnarholdings merged commit 2e76494 into main Jul 21, 2026
35 checks passed
@girnarholdings
girnarholdings deleted the feat/subagent-fleet-doctrine branch July 21, 2026 16:26
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant