forked from enderofwings/NexusOS
Rewritten from a coding-rules-only playbook into the full mode: minimal solutions AND compressed speech, triggered per conversation by tag. Two rules lead the prompt because a small local model drops whatever is buried in the middle. Rule 1: anything destructive gets a full-sentence warning BEFORE the command, naming what is lost and what to back up - brevity never applies there. Rule 2: an abstraction asked for with a single use gets a one-line "not needed" and the small version instead. Rule 1 is repeated at the very end, which is what made it hold in testing. Tags carry the trigger words. A reference playbook is injected only when one of its tag words appears in the message (_route_playbooks), so a playbook with no matching tag never routes in at all. Known limits, measured against llama3.1:8b: as a reference playbook only the voice holds reliably. The build ladder and the warning-before-command ordering need the playbook promoted to first position, because the chat endpoint appends memory facts, conversation snippets and documents AFTER the reference block - a reference playbook cannot own the end of the prompt, so a rule needing recency weighting cannot get it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>