Repository navigation
Consolidate shared agent prompt rules - #277
Merged
hffmnnj merged 4 commits intoAug 3, 2026
Merged
Conversation
Add a single Prompt Authoring Rules section to core-protocol.md covering layer precedence, absolutes-for-invariants, outcome-first framing, one autonomy policy per role, and the one shared tool-call batching rule. Offset the addition by removing genuinely duplicated material from dispatch-patterns.md (restated batching rule, Anti- Patterns bullets that duplicated Common Mistakes and Single-Branch Parallelism Rule, a Quick-mode exception restating its own table) and subagent-identity.md (an Anti-Patterns section that restated Never Do verbatim). Net effect: references/ total -2 chars / -1 byte vs the locked baseline, 0 net token change. Update the Wave 1 prompt-audit baseline test to the new, intentionally changed references byte count and absolute-hits count, since those values were the direct and expected result of this consolidation.
Restructure the Conductor prompt outcome-first: one-line boot pointer, one autonomy policy merging deviation rules and lazy-autopilot hard stops, a Delegation section naming all six executor tiers with a pointer to dispatch-patterns.md's Agent Selection tables instead of duplicating them, a Gate Enforcement pointer to phase-gates.md's Gate Overview instead of restating it, and a compacted Context Compaction section pointing to core-protocol.md's DB-as-State Durability Guarantees for mechanism detail already documented there. Auto- Delegation and the Research-First Gate keep their exact behavioral content (planner-blocked-until-research, skip heuristic, mid-wave research, fallback, sequencing) in prose instead of decorative example tables. Every Wave 2 semantic invariant is preserved: Conductor/executor separation sentence, all six executor tiers named and reachable, the five workflow phase names, memory-first boot pointer, response- envelope pointer, and plan-phase source-write prohibition are all still asserted by real-agent-stack tests. Measured (chars/bytes/tokens/absolute-hits/bold-spans): goop-orchestrator.md 17,109/17,207/4,278/26/60 -> 9,734/9,807/2,434/20/26 (-43.1%/-43.0%/-43.1%/-6/-34). agents/ category: 99,822 -> 92,422 bytes (decrease, per MH6). agents+commands combined: 125,369 -> 117,969 bytes, now under the 118,798 (-5%) bar against the locked 125,051 baseline. Workflow-wide absolute-language hits: 396 -> 390. Updated the prompt-audit real-tree sentinel test to the new agents byte/bold-span totals and the new absolute-hit total, since these are the direct, spec-directed result of this consolidation. The immutable Wave 1 baseline stays recorded in RESEARCH.md.
…hestrator Verifier found that the Core Identity bullet Never write code paraphrased the execute phase's runtime MUST-NOT-DO rule (Write code directly - ALWAYS delegate to subagents, phase-context.ts). Replaced it with a bare pointer to dispatch-patterns.md's Conductor Identity / Prohibited Orchestrator Actions table, which already owns that prohibition, instead of restating it in different words. Preserved the non-duplicated content in the same bullet (scoped test evidence discipline, the image-generation boundary note). No other section changed. Measured: goop-orchestrator.md 9,807 -> 9,890 bytes (+83, the pointer sentence is longer than the phrase it replaced) but drops one more absolute-language hit (20 -> 19) since the bolded Never write code header is gone. agents/ category: 92,422 -> 92,505 bytes, still a decrease from the 99,822 baseline. Workflow-wide absolute-hit total: 390 -> 389. Updated the prompt-audit current-tree sentinel for the new agents byte total and absolute-hit total. Immutable Wave 1 baseline unchanged in RESEARCH.md.
…d pointers Consolidate the 13 non-orchestrator agent files following the orchestrator pattern: one-line boot pointer to core-protocol.md §Agent Boot Sequence replacing repeated boot prose, normalized identity anchor, duplicated tier/delegation tables replaced by pointers to dispatch-patterns.md, standalone Memory-First sections removed (boot pointer covers memory-first semantically per the semantic invariant test), Long-Running Commands trimmed, decorative examples and closers removed, bold spans and absolute language trimmed toward the spec targets. All role-specific responsibilities, scope, methods, deliverables, stop/block conditions, tool permissions, and safety boundaries preserved: planner contract/spec/traceability/research-first duties, debugger hypothesis/evidence/root-cause discipline, tester value-first test authoring and scoped execution rules, verifier adversarial spec/security/wiring review, researcher source quality/evidence/ provenance, explorer read-only mapping and uncertainty reporting, writer documentation ownership and no invented claims, executor tier scope distinctions, test/commit obligations, and frontend design/ accessibility distinctions. Measured (bytes/absolute-hits/bold-spans): agents/ category: 92,505/118/241 -> 76,992/62/127 (-16.8% bytes, -56 abs, -114 bold). agents+commands combined: 118,052 -> 102,539 bytes, under the 118,798 (-5%) bar and the 112,546 (-10%) stretch target. Workflow-wide absolute-language hits: 389 -> 333; the <=300 bar is a workflow-wide target requiring further command/reference trimming. Agent bold spans: 241 -> 127, under the 200 bar. Updated the prompt-audit real-tree sentinel test to the new agents byte/bold-span totals and the new absolute-hit total. The immutable baseline stays recorded in RESEARCH.md.
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.
Summary
Measured result
Verification