Skip to content

perf: trim persona system prompts — 56% token reduction#1122

Merged
nextlevelshit merged 2 commits intomainfrom
perf-1121-persona-trim
Apr 16, 2026
Merged

perf: trim persona system prompts — 56% token reduction#1122
nextlevelshit merged 2 commits intomainfrom
perf-1121-persona-trim

Conversation

@nextlevelshit
Copy link
Copy Markdown
Collaborator

Summary

  • Rewrote all 14 core persona .md files to lean Rules + Constraints structure
  • Consolidated git forensics commands into base-protocol.md (was duplicated across 7 personas)
  • Removed craftsman ↔ implementer comparison tables (pipeline authors choose personas, not agents)
  • Trimmed base-protocol.md from 85 → 54 lines (removed template variable table, Known Limitations)
  • Updated test thresholds: min tokens 100→60, mandatory section accepts Rules alongside Responsibilities

575 → 250 lines total (-56%), 928 deletions, 278 insertions across 31 files

Persona Before After Delta
craftsman 41 15 -63%
navigator 42 14 -65%
implementer 41 15 -63%
summarizer 27 14 -48%
reviewer 33 14 -57%
philosopher 43 14 -67%
planner 35 14 -60%
debugger 36 13 -63%
auditor 34 14 -58%
supervisor 42 15 -64%
provocateur 40 14 -65%
researcher 34 14 -58%
validator 21 13 -38%
synthesizer 23 13 -43%
base-protocol 85 54 -35%

Test plan

  • All existing tests pass (go test ./... — zero failures)
  • TestPersonaFilesTokenRange — updated threshold, all personas within 60-400 range
  • TestPersonaFilesMandatorySections — accepts Rules as mandatory section
  • TestInitPersonaPromptContent — keyword assertions still pass
  • .wave/personas/ synced with internal/defaults/personas/

Closes #1121

All core persona .md files rewritten to Rules + Constraints structure.
Removed duplicate craftsman↔implementer comparison tables, git forensics
duplication across 7 personas (moved to base-protocol), redundant
Quality Checklists / Anti-Patterns / Responsibilities sections.

575 → 250 lines total. Git forensics consolidated into base-protocol
as conditional section instead of duplicated across 7 personas.

Test thresholds updated: min tokens 100→60, mandatory section
accepts Rules alongside Responsibilities.

Related to #1121
…aces

Events, traces, and WebUI displayed the adapter binary name (e.g.,
"opencode") instead of the manifest key (e.g., "opencode-local").
Replaced all adapterDef.Binary references with resolvedAdapterName
in executor.go (5 occurrences) and meta.go (1 occurrence).

Related to #1121
@nextlevelshit nextlevelshit merged commit 79070d4 into main Apr 16, 2026
7 checks passed
@nextlevelshit nextlevelshit deleted the perf-1121-persona-trim branch April 16, 2026 08:46
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.

perf: trim persona system prompts — 65% token reduction

1 participant