Skip to content

Add TUI palette, agent awareness, and evidence loop - #15

Merged
TerminallyLazy merged 2 commits into
codex/rust-only-repo-v0.9from
codex/install-onboarding-v0.10
Jul 5, 2026
Merged

TerminallyLazy merged 2 commits into
codex/rust-only-repo-v0.9from
codex/install-onboarding-v0.10

Conversation

@TerminallyLazy

Copy link
Copy Markdown
Owner

Summary:

  • Apply the Tree Ring Memory retro palette to the Ratatui console as functional ring/status accents.
  • Add non-destructive init scaffolding for agent awareness: .tree-ring/AGENTS.md, .tree-ring/SKILL.md, and .tree-ring/CLI.md.
  • Add tree-ring evidence for the Revolve-inspired evidence loop: promoted -> heartwood, rejected -> scar, deferred -> seed, observed -> outer.
  • Update README, integration docs, skill, and DOX template with onboarding, TUI, agent-awareness, and evidence-loop instructions.

Verification:

  • cargo test: passed.
  • Real init smoke created memory.sqlite, AGENTS.md, SKILL.md, and CLI.md.
  • Real evidence smoke stored promoted evidence as heartwood and recalled it by project.

Notes:

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: c186c8fb-336e-4d58-951c-7c51b3c750c6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands.

@TerminallyLazy
TerminallyLazy merged commit c3e1c27 into codex/rust-only-repo-v0.9 Jul 5, 2026
1 check passed

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the tree-ring evidence command to support recording evidence-backed outcomes, adds automated agent-awareness file generation (AGENTS.md, SKILL.md, CLI.md) during initialization, and refactors the TUI styling to use a centralized theme module. The review feedback highlights opportunities to optimize the TUI rendering loop by passing references instead of cloning strings (such as app.status, memory.id, and app.command_buffer) on every frame. Additionally, it is recommended to update the shell_path helper to properly escape paths containing spaces to ensure generated commands remain valid.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +127 to +129
fn shell_path(path: &Path) -> String {
path.display().to_string()
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The shell_path function in agent_awareness.rs does not handle paths containing spaces, unlike the implementation in welcome.rs. If the project path contains spaces, the generated shell commands in AGENTS.md will be malformed and broken when copy-pasted or executed by an agent. Update this function to wrap paths containing spaces in single quotes.

fn shell_path(path: &Path) -> String {
    let value = path.display().to_string();
    if value.contains(' ') {
        format!("'{value}'")
    } else {
        value
    }
}

Span::raw(format!(" private:{}", app.dashboard.sensitive_total)),
Span::raw(format!(" status: {}", app.status)),
Span::styled(" status: ", theme::dim()),
Span::raw(app.status.clone()),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

In Ratatui, the render function is called on every tick/frame. Cloning app.status (which is a String) on every render pass introduces unnecessary allocations. Since Span::raw accepts &str or &String (via Into<Cow<'a, str>>), you can pass a reference directly to avoid the clone.

Suggested change
Span::raw(app.status.clone()),
Span::raw(&app.status),

Comment on lines 236 to 250
lines.push(Line::from(vec![
Span::styled("id ", Style::default().fg(Color::DarkGray)),
Span::styled("id ", theme::dim()),
Span::raw(memory.id.clone()),
]));
lines.push(Line::from(vec![
Span::styled("ring ", Style::default().fg(Color::DarkGray)),
Span::raw(memory.ring.clone()),
Span::styled(" type ", Style::default().fg(Color::DarkGray)),
Span::styled("ring ", theme::dim()),
Span::styled(
memory.ring.clone(),
Style::default()
.fg(theme::ring_color(&memory.ring, 0.0))
.add_modifier(Modifier::BOLD),
),
Span::styled(" type ", theme::dim()),
Span::raw(memory.event_type.clone()),
]));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to the header rendering, cloning memory.id, memory.ring, and memory.event_type inside render_detail introduces unnecessary allocations on every render pass. You can pass references instead to improve performance and reduce memory churn.

Suggested change
lines.push(Line::from(vec![
Span::styled("id ", Style::default().fg(Color::DarkGray)),
Span::styled("id ", theme::dim()),
Span::raw(memory.id.clone()),
]));
lines.push(Line::from(vec![
Span::styled("ring ", Style::default().fg(Color::DarkGray)),
Span::raw(memory.ring.clone()),
Span::styled(" type ", Style::default().fg(Color::DarkGray)),
Span::styled("ring ", theme::dim()),
Span::styled(
memory.ring.clone(),
Style::default()
.fg(theme::ring_color(&memory.ring, 0.0))
.add_modifier(Modifier::BOLD),
),
Span::styled(" type ", theme::dim()),
Span::raw(memory.event_type.clone()),
]));
lines.push(Line::from(vec![
Span::styled("id ", theme::dim()),
Span::raw(&memory.id),
]));
lines.push(Line::from(vec![
Span::styled("ring ", theme::dim()),
Span::styled(
&memory.ring,
Style::default()
.fg(theme::ring_color(&memory.ring, 0.0))
.add_modifier(Modifier::BOLD),
),
Span::styled(" type ", theme::dim()),
Span::raw(&memory.event_type),
]));

Comment on lines 275 to 287
if app.mode == AppMode::Command {
lines.push(Line::from(""));
lines.push(Line::from(vec![
Span::styled("/", Style::default().fg(Color::LightYellow)),
Span::styled("/", theme::brand()),
Span::raw(app.command_buffer.clone()),
]));
} else if app.mode == AppMode::Search {
lines.push(Line::from(""));
lines.push(Line::from(vec![
Span::styled("search ", Style::default().fg(Color::LightYellow)),
Span::styled("search ", theme::brand()),
Span::raw(app.search_query.clone()),
]));
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Avoid cloning app.command_buffer and app.search_query during render passes. Passing references is sufficient and avoids unnecessary allocations.

Suggested change
if app.mode == AppMode::Command {
lines.push(Line::from(""));
lines.push(Line::from(vec![
Span::styled("/", Style::default().fg(Color::LightYellow)),
Span::styled("/", theme::brand()),
Span::raw(app.command_buffer.clone()),
]));
} else if app.mode == AppMode::Search {
lines.push(Line::from(""));
lines.push(Line::from(vec![
Span::styled("search ", Style::default().fg(Color::LightYellow)),
Span::styled("search ", theme::brand()),
Span::raw(app.search_query.clone()),
]));
}
if app.mode == AppMode::Command {
lines.push(Line::from(""));
lines.push(Line::from(vec![
Span::styled("/", theme::brand()),
Span::raw(&app.command_buffer),
]));
} else if app.mode == AppMode::Search {
lines.push(Line::from(""));
lines.push(Line::from(vec![
Span::styled("search ", theme::brand()),
Span::raw(&app.search_query),
]));
}

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.

1 participant