@hej / sigit / commits / 6657283

Update system messages and prompt for clarity and tone

- Replace AI agent intro with a quote in chat.rs - Adjust title suffix to "maybe deploy later?" - Rewrite SYSTEM_PROMPT for siGit: clarify name, tone, and instructions - Simplify and clarify comments throughout main.rs

Seto Elkahfi committed Apr 12, 2026 at 11:39 UTC 665728329bf3c476ed6881cd4320df3e58ac61a2
2 files changed +17 -12
src/chat.rs
+5 -2
@@ -97,7 +97,7 @@ impl App {
97 env!("CARGO_PKG_VERSION"),
98 )));
99 messages.push(ChatMessage::system(
100 - "AI coding agent, powered by local LLM.",
100 + "In this world, nothing can be said to be certain, except death and taxes. ~ Pak Sigit",
101 ));
102 messages.push(ChatMessage::system("Type /help for commands."));
103
@@ -239,7 +239,10 @@ fn render_title(frame: &mut Frame, area: ratatui::layout::Rect) {
239 .add_modifier(Modifier::BOLD),
240 ),
241 Span::styled(" Code", Style::default().fg(Color::White)),
242 - Span::styled(" — AI Chat", Style::default().fg(Color::DarkGray)),
242 + Span::styled(
243 + " — maybe deploy later?",
244 + Style::default().fg(Color::DarkGray),
245 + ),
246 ]);
247 frame.render_widget(
248 Paragraph::new(title).style(Style::default().bg(Color::Black)),
src/main.rs
+12 -10
@@ -40,17 +40,21 @@ use tokio::sync::{Mutex, mpsc};
40 use tokio_util::compat::{TokioAsyncReadCompatExt, TokioAsyncWriteCompatExt};
41
42 const SYSTEM_PROMPT: &str = "\
43 -You are siGit, an expert AI coding agent integrated directly into your editor \
44 -via the Agent Client Protocol. You specialize in:
43 +Your name is siGit — spelled exactly that way: lowercase 's', uppercase 'G', \
44 +no spaces. Never write it as 'SiGit', 'Sigit', or any other variation. \
45 +When introducing yourself, say 'I am siGit'.
46 +
47 +You are an AI coding agent built into the editor via the Agent Client Protocol. \
48 +You help with:
49
50 - Code analysis, writing, and refactoring
51 - Bug hunting and debugging
52 - Git workflows and commit messages
53 - Software architecture and design patterns
50 -- Code review and best practices
54 +- Code review
55
52 -Be concise, precise, and practical. Write clean, idiomatic code with brief \
53 -explanations. Identify root causes when debugging. Prefer correctness over brevity.";
56 +Be direct and brief. Write clean, idiomatic code. When debugging, go for the \
57 +root cause, not the symptom. Correct beats clever.";
58
59 // ── Per-session state ────────────────────────────────────────────────────────
60
@@ -62,8 +66,7 @@ struct Session {
66
67 // ── Agent implementation ─────────────────────────────────────────────────────
68
65 -/// The actual agent. Holds one `ChatEngine` (loaded lazily on the first
66 -/// session) and talks ACP over stdio.
69 +/// The agent. One `ChatEngine`, loaded on the first session.
70 struct SiGitAgent {
71 engine: Arc<ChatEngine>,
72 active_session: Arc<Mutex<Option<Session>>>,
@@ -173,7 +176,6 @@ impl Agent for SiGitAgent {
176 user_text.chars().take(80).collect::<String>()
177 );
178
176 - // Stream tokens from the LLM and forward each one as an ACP update.
179 let mut rx = self
180 .engine
181 .stream_message(user_text)
@@ -261,7 +263,7 @@ async fn run_interactive() -> anyhow::Result<()> {
263
264 // ── ACP server mode ──────────────────────────────────────────────────────────
265
264 -/// Speak ACP JSON-RPC over stdio. The editor spawns us as a subprocess.
266 +/// The editor spawns us and talks ACP over stdio.
267 async fn run_acp_server() -> anyhow::Result<()> {
268 // Agent::prompt sends chunks here; the forwarder task writes them out.
269 let (notification_tx, mut notification_rx) = mpsc::channel::<SessionNotification>(256);
@@ -277,7 +279,7 @@ async fn run_acp_server() -> anyhow::Result<()> {
279
280 local
281 .run_until(async move {
280 - // Wire up the ACP connection. The closure spawns its internal IO tasks.
282 + // Wire up the ACP connection.
283 let (conn, io_task) = AgentSideConnection::new(
284 agent,
285 stdout,