Skip to content

Commit 4949881

Browse files
committed
feat(prompts): Constitution of CodeWhale — tiered prompt architecture
- Replace flat base.md with Constitutional hierarchy: Preamble + 7 Articles - We begin with Brother Whale — founding intelligence, not personality - Dynamic model identity: {model_id} template injected at runtime - Article VII: Hierarchy of Law — 9-tier conflict resolution - Goal mode: remove read-only claim, add Goal Loop + Wakeup Check - Personality (calm.md): Tier 8 subordination, cannot override constitution - Memory: Tier 7 enforcement, imperatives treated as preferences - Handoff: Tier 9 staleability, subordinate to evidence and user - Approval prompts: Tier 2 Statute markers - Authority recap appended at end of system prompt - model_id threaded through PromptSessionContext → engine + UI - 9 new tests: constitutional order, model injection, goal correctness
1 parent 37a1d28 commit 4949881

11 files changed

Lines changed: 415 additions & 137 deletions

File tree

crates/tui/src/core/engine.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ impl Engine {
443443
project_context_pack_enabled: config.project_context_pack_enabled,
444444
locale_tag: &config.locale_tag,
445445
translation_enabled: config.translation_enabled,
446+
model_id: &config.model,
446447
},
447448
session.approval_mode,
448449
);
@@ -1817,6 +1818,7 @@ impl Engine {
18171818
project_context_pack_enabled: self.config.project_context_pack_enabled,
18181819
locale_tag: &self.config.locale_tag,
18191820
translation_enabled: self.config.translation_enabled,
1821+
model_id: &self.config.model,
18201822
},
18211823
self.session.approval_mode,
18221824
);

0 commit comments

Comments
 (0)