Skip to content

feat(prompt): add memory hygiene and hoist universal engineering discipline to base prompt#1085

Merged
wpfleger96 merged 5 commits into
mainfrom
duncan/core-memory-hygiene-prompt
Jun 17, 2026
Merged

feat(prompt): add memory hygiene and hoist universal engineering discipline to base prompt#1085
wpfleger96 merged 5 commits into
mainfrom
duncan/core-memory-hygiene-prompt

Conversation

@wpfleger96

@wpfleger96 wpfleger96 commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two prompt-surface improvements that make base_prompt.md (concatenated onto every persona via pool.rs:437) carry both memory-management guidance and the universal engineering discipline that previously lived only in Fizz.

Commit 1 — feat(prompt): add core-memory hygiene to shared base prompt

Adds an ## Agent Memory section to base_prompt.md with three rules:

  • Keep core small (~10 KB soft target) — identity, standing lessons, live-parked arcs only.
  • Durable detail goes to cold mem/<topic> slugs, not core.
  • Treat core as load-bearing; cite sources.

Cuts the redundant # Memory and Shared Knowledge block from FIZZ_SYSTEM_PROMPT (Fizz was the only consumer; now every agent gets the guidance via base).

Commit 2 — refactor(prompt): hoist universal engineering discipline from Fizz to base

Moves 7 sections from Fizz's persona prompt into base_prompt.md:

  • Core Operating Rules
  • Size The Task First (CHORE/SMALL/STANDARD/CONTINUATION)
  • Worktree Discipline
  • Standard Workflow (9-step incl. adversarial review)
  • Autonomy (escalation ladder)
  • Git and Commits
  • Quality Bar

Also deduplicates Communication: folds 3 unique Fizz lines into base's existing ### General, drops true duplicates, keeps the bee-emoji rule in Fizz.

After this PR, FIZZ_SYSTEM_PROMPT contains only persona-specific content: personality framing, # Subagents and Peers (runtime-specific — buzz-agent has no subagent-spawning tool), and the bee-emoji communication line.

Key design decision: Autonomy step 3 reworded from "Spawn a research subagent" to a capability-agnostic "Delegate or parallelize — hand a tangent to a separate agent or a fresh-context pass when one is available" — avoids a dangling reference to a tool/section that stays Fizz-only.

Files changed

File Change
crates/buzz-acp/src/base_prompt.md +102 (memory section + 7 engineering sections + 3 comms lines)
desktop/src-tauri/src/managed_agents/personas.rs -106 (memory block + 7 sections + deduped comms removed from Fizz)

Verification

  • cargo build -p buzz-acp clean (the crate that include_str!s base_prompt.md).
  • desktop/src-tauri sidecar build failure is pre-existing (missing binary artifact, unrelated to prompt content).
  • No net content loss: every moved line lands in base; only true Communication duplicates dropped.
  • No trailing whitespace; files end with newline.

@wpfleger96 wpfleger96 changed the title feat(prompt): add core-memory hygiene to shared base prompt feat(prompt): add memory hygiene and hoist universal engineering discipline to base prompt Jun 17, 2026
npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 and others added 5 commits June 17, 2026 16:15
Agents had no prompt-level steering toward keeping core memory lean — the
only prune guidance ("keep permanent memory small") lived in the Fizz
default persona and never reached the custom team personas, which inherit
base_prompt.md but not FIZZ_SYSTEM_PROMPT. Core memory re-bloated with no
prompt telling agents where durable detail belongs instead of core.

Move the guidance into base_prompt.md (prepended to every agent regardless
of persona), add a core-specific cold-slug escape hatch, and reframe the
65,535-byte limit as a budget with a ~10 KB soft target. Remove the now-
redundant Memory block from Fizz, which inherits the shared guidance.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
… base

Fizz's persona carried ~80% universal agent-engineering guidance (operating
rules, task sizing, worktree discipline, the standard workflow, autonomy,
git, quality bar) that every buzz-agent benefits from but only Fizz received.
base_prompt.md is concatenated onto every persona (pool.rs:437), so moving
these sections there gives all agents the engineering bar regardless of
persona, leaving Fizz with only persona-specific content.

Soften the Autonomy escalation ladder's subagent step to a capability-agnostic
delegate/parallelize line — buzz-agent has no subagent-spawning tool, and the
Subagents-and-Peers explainer stays Fizz-only, so a literal subagent
instruction would dangle in the shared prompt. Dedup Communication against
base's existing Communication Patterns: fold the three unique Fizz lines in,
drop true duplicates, keep the bee-emoji rule in Fizz.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
The hoisted engineering block baked the codex CLI into the universal
base prompt via three command examples, which reads as broken until a
user installs codex — antithetical to buzz-agent working out-of-box
with whatever provider a user already has. The 9-step numbered Standard
Workflow was also over-prescriptive; agents follow guidelines better
than rigid step lists. Collapse the 7 sections into three guideline
sections, dropping the tool lock-in and the procedure form while keeping
every underlying value (narration, candor, validation, independent
second-opinion-as-concept, self-review, risk-scaling, repo/git rules,
autonomy ladder).

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
The "You want an independent review of a large diff" subagent trigger
restated base_prompt.md's universal second-opinion principle, which now
owns that guidance capability-agnostically for every agent. The other
three subagent triggers are capability-decompose rules with no base
equivalent and stay.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
The push-without-approval bullet in base_prompt.md's Working in the Repo
section is no longer a needed guardrail.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
@wpfleger96 wpfleger96 force-pushed the duncan/core-memory-hygiene-prompt branch from 70a9686 to c8aa4cf Compare June 17, 2026 20:15
@wpfleger96 wpfleger96 enabled auto-merge (squash) June 17, 2026 20:16
@wpfleger96 wpfleger96 disabled auto-merge June 17, 2026 20:16
@wpfleger96 wpfleger96 enabled auto-merge (squash) June 17, 2026 20:16
@wpfleger96 wpfleger96 disabled auto-merge June 17, 2026 21:21
@wpfleger96 wpfleger96 merged commit 010e802 into main Jun 17, 2026
45 of 47 checks passed
@wpfleger96 wpfleger96 deleted the duncan/core-memory-hygiene-prompt branch June 17, 2026 21:21
tlongwell-block pushed a commit that referenced this pull request Jun 18, 2026
…te-response

* origin/main: (194 commits)
  Fold agent core memory into the session system prompt (#1112)
  feat(cli): add patches and issues commands for NIP-34 git collaboration (#1073)
  fix(desktop): stop random timeline message loss + page reconnect replay (#1105)
  Update README.md
  fix(desktop): keep thread replies from scrolling channel (#1109)
  fix(buzz-acp): accept siblings under allowlist author gate (#1108)
  feat(deploy): add production Helm chart for Buzz (#990)
  fix(desktop): keep MembersSidebar input usable while an add is in flight (#1106)
  chore(release): release version 0.3.25 (#1102)
  fix(desktop): stop dimming deferred message lists (#1104)
  Smooth channel loading: single-surface timeline state machine (#1099)
  feat: surface base + persona system prompts in observer feed (#1103)
  ci: move reminder e2e to a dedicated backend-integration job (#1098)
  fix: give agent-observer sub a replay-capable limit (#1100)
  fix: make managed-agent spawn and teardown portable to Windows (#1097)
  fix(desktop): constrain message timeline width with min-w-0 (#1092)
  feat(desktop): reminders notifications, snooze, overlay, and inbox view mode (#1093)
  feat(prompt): add memory hygiene and hoist universal engineering discipline to base prompt (#1085)
  fix(desktop): correct thread-unread badge flicker, stale clear, phantom count, mention gate, and nested count (#1080)
  Fix mention chip alignment (#1094)
  ...

# Conflicts:
#	crates/buzz-cli/src/commands/workflows.rs
tlongwell-block pushed a commit that referenced this pull request Jun 18, 2026
…te-response

* origin/main: (194 commits)
  Fold agent core memory into the session system prompt (#1112)
  feat(cli): add patches and issues commands for NIP-34 git collaboration (#1073)
  fix(desktop): stop random timeline message loss + page reconnect replay (#1105)
  Update README.md
  fix(desktop): keep thread replies from scrolling channel (#1109)
  fix(buzz-acp): accept siblings under allowlist author gate (#1108)
  feat(deploy): add production Helm chart for Buzz (#990)
  fix(desktop): keep MembersSidebar input usable while an add is in flight (#1106)
  chore(release): release version 0.3.25 (#1102)
  fix(desktop): stop dimming deferred message lists (#1104)
  Smooth channel loading: single-surface timeline state machine (#1099)
  feat: surface base + persona system prompts in observer feed (#1103)
  ci: move reminder e2e to a dedicated backend-integration job (#1098)
  fix: give agent-observer sub a replay-capable limit (#1100)
  fix: make managed-agent spawn and teardown portable to Windows (#1097)
  fix(desktop): constrain message timeline width with min-w-0 (#1092)
  feat(desktop): reminders notifications, snooze, overlay, and inbox view mode (#1093)
  feat(prompt): add memory hygiene and hoist universal engineering discipline to base prompt (#1085)
  fix(desktop): correct thread-unread badge flicker, stale clear, phantom count, mention gate, and nested count (#1080)
  Fix mention chip alignment (#1094)
  ...

Co-authored-by: Tyler Longwell <tlongwell@squareup.com>
Signed-off-by: Tyler Longwell <tlongwell@squareup.com>

# Conflicts:
#	crates/buzz-cli/src/commands/workflows.rs
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.

2 participants