Skip to content

v2.7.0 — Prompt system hardening

Choose a tag to compare

@cuongntr cuongntr released this 26 May 04:42
· 56 commits to main since this release

Prompt system hardening: typed routing metadata, per-model-family prompt variants, Oracle guardrails, metadata-driven overlay routing, and tighter delegate descriptions.

Added

  • Typed routing metadata — SubAgentRoutingMetadata interface with category, cost, useWhen, avoidWhen, and optional keyTrigger fields on SubAgentDeclaration. All five builtin sub-agents carry routing metadata.
  • systemPromptByFamily declaration field — optional per-model-family prompt overrides resolved via resolveSystemPromptBody(). Variant selection is driven solely by the configured nested model (never the parent's cached model family).
  • Oracle GPT prompt variant — prose-first output, explicit opener blacklist, and effort tags. Selected when the configured nested model is a GPT-family model (gpt-*, o1-*, o3-*, o4-*).
  • General GPT prompt variant — streamlined executor prompt with opener blacklist and overlay-deferring tool access.
  • Oracle guardrails — Long-Context Handling (anchor claims to file paths, label inferred items, flag contradictions) and High-Risk Self-Check (re-scan for unstated assumptions, verify no new failure modes) sections in the default Oracle prompt.
  • Routing summary helpers — buildRoutingSummary() and buildOverlayRoutingMatrix() in src/sub-agents/routing.ts.
  • Sub-Agent Routing section in /blackbytes-status — displays category, cost, use-when/avoid-when, and key trigger for each enabled sub-agent.
  • YAML routing field — optional typed routing metadata in YAML sub-agent declarations with validation.
  • Description length enforcement — test assertions verify all builtin delegate descriptions are ≤ 400 chars.

Changed

  • Bytes overlay routing matrix is metadata-driven — replaces per-agent hardcoded if checks with buildOverlayRoutingMatrix() from registered SubAgentMeta.
  • General's Tool Access prompt section defers to the runtime safety overlay for the authoritative tool list.
  • Delegate tool descriptions shortened to ≤ 400 chars each. Strict delegation gates and cost signals preserved.
  • /blackbytes-status Sub-Agent Routing replaces the removed Compact Tool Output section (10 sections total).