Skip to content

Ship installer onboarding and evidence loop - #16

Merged
TerminallyLazy merged 6 commits into
mainfrom
codex/rust-only-repo-v0.9
Jul 5, 2026
Merged

TerminallyLazy merged 6 commits into
mainfrom
codex/rust-only-repo-v0.9

Conversation

@TerminallyLazy

@TerminallyLazy TerminallyLazy commented Jul 5, 2026 •

Copy link
Copy Markdown
Owner

Summary:

  • Bring the Rust-only v0.10 stack to main: one-line installer, terminal onboarding, and README install/TUI instructions.
  • Add Tree Ring Memory retro palette accents to the Ratatui TUI.
  • Add non-destructive agent-awareness scaffolding under .tree-ring/: AGENTS.md, SKILL.md, and CLI.md.
  • Add tree-ring evidence for the Revolve-inspired evidence loop with promoted/rejected/deferred/observed outcome mapping.

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.
  • Installer smoke passed earlier with --source, --project, --init, --no-animation.

Notes:

Summary by CodeRabbit

  • New Features

    • Added a new welcome/onboarding experience for first-time use, including optional initialization and a no-animation mode.
    • Introduced an evidence-based workflow for recording evaluated outcomes, with clearer result reporting.
    • Added a one-line installer with support for global or project-local setup.
  • Bug Fixes

    • Prevented onboarding files from being overwritten if they already exist.
  • Documentation

    • Expanded the README and related guides with updated install, onboarding, and workflow examples.
    • Updated version references to v0.10.0 across project metadata.

@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

Review Change Stack

Warning

Review limit reached

@TerminallyLazy, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 50 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: a598cea9-79be-4ddc-9bc6-e12cdebe0d8b

📥 Commits

Reviewing files that changed from the base of the PR and between c3e1c27 and fe2a58e.

📒 Files selected for processing (3)
  • crates/tree-ring-memory-cli/src/agent_awareness.rs
  • crates/tree-ring-memory-cli/src/welcome.rs
  • install.sh
📝 Walkthrough

Walkthrough

Adds a POSIX install.sh installer, a Rust welcome onboarding CLI command, an agent_awareness module that generates .tree-ring/ guidance files, an evidence CLI subcommand mapping evaluated outcomes to memory rings, a centralized TUI theme module refactoring render/rings styling, version bumps to 0.10.0, and corresponding documentation/design docs.

Changes

Installer, Onboarding, Evidence, and TUI Theme

Layer / File(s) Summary
Agent awareness file generation
crates/tree-ring-memory-cli/src/agent_awareness.rs
Adds AgentAwarenessReport and ensure_agent_awareness to create .tree-ring/ root and write AGENTS.md/SKILL.md/CLI.md only if missing, with tests.
Welcome onboarding command
crates/tree-ring-memory-cli/src/welcome.rs
Adds run, animated/static intro rendering, ASCII ring frames, next-command suggestions, and tests validating store/file creation.
CLI dispatch for Welcome, Init, Evidence
crates/tree-ring-memory-cli/src/main.rs
Adds Command::Welcome/Command::Evidence, dispatches welcome before store opening, wires agent-awareness into init, adds evidence_event/evidence_details/evidence_tags mapping outcomes to rings, and adds tests.
TUI theme module and refactor
crates/tree-ring-memory-cli/src/tui/theme.rs, .../tui/mod.rs, .../tui/render.rs, .../tui/rings.rs
Adds a theme module with palette colors, styles, panels, and ring_color, and refactors rendering code to use it instead of manual Color/Block construction.
install.sh installer script
install.sh
Adds environment defaults, argument parsing, ASCII intro, cargo install logic (local path or git), binary verification, optional welcome invocation, and PATH/TUI guidance output.
Version bumps and documentation
Cargo.toml, bindings/python/pyproject.toml, README.md, docs/architecture/rust-core-status.md, docs/integrations/agent-skill.md, skills/tree-ring-memory/SKILL.md, templates/dox/AGENTS.md, docs/superpowers/plans/..., docs/superpowers/specs/...
Bumps versions to 0.10.0 and documents install/evidence workflows, onboarding, and design/implementation plans.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant InstallScript as install.sh
    participant Cargo
    participant TreeRingCLI as tree-ring welcome
    participant AgentAwareness as agent_awareness

    User->>InstallScript: run install.sh [--project] [--init]
    InstallScript->>Cargo: cargo install --path/--git tree-ring-memory-cli
    Cargo-->>InstallScript: binary installed
    InstallScript->>TreeRingCLI: invoke welcome --init --no-animation
    TreeRingCLI->>TreeRingCLI: open/initialize SQLite store
    TreeRingCLI->>AgentAwareness: ensure_agent_awareness(root)
    AgentAwareness-->>TreeRingCLI: AgentAwarenessReport (created/existing)
    TreeRingCLI-->>User: print welcome summary + next commands
Loading
sequenceDiagram
    participant User
    participant CLI as tree-ring-memory-cli
    participant EvidenceLogic as evidence_event
    participant Store as SQLite store

    User->>CLI: tree-ring evidence --outcome promoted --evidence-ref <ref>
    CLI->>EvidenceLogic: build MemoryEvent(outcome, evidence_ref, score, tags)
    EvidenceLogic->>EvidenceLogic: validate fields, map outcome to ring/type/salience
    EvidenceLogic-->>CLI: MemoryEvent
    CLI->>Store: persist event
    Store-->>CLI: confirmation
    CLI-->>User: print ring, summary, evidence reference
Loading

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.

@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 bumps the project version to 0.10.0, introducing a POSIX installer script (install.sh), a Rust-native welcome onboarding command, and an evidence-driven improvement loop via the evidence command. The TUI has also been updated with a unified theme module. The review feedback identifies several portability and reliability issues: a non-portable sub-second sleep command and an unsafe $HOME reference under set -u in install.sh, a potential database initialization failure in welcome.rs due to directory creation order, and unquoted paths with spaces in the shell_path helper of agent_awareness.rs.

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 thread install.sh Outdated
for pulse in "*" "+" "*" "+"; do
printf '\033[2J\033[H'
ring_frame "$pulse"
sleep 0.08

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The sleep 0.08 command is not portable in standard POSIX sh (which only guarantees integer seconds) and will fail on systems with strict POSIX-compliant sleep implementations (such as Alpine Linux/busybox without fancy sleep enabled). Since set -e is active, this failure will cause the entire installation script to exit immediately.

Consider redirecting stderr and appending a fallback or ignoring the error so the installation doesn't crash on non-GNU/non-BSD systems.

Suggested change
sleep 0.08
sleep 0.08 2>/dev/null || :

Comment thread install.sh
if [ "$INSTALL_SCOPE" = "project" ]; then
printf '%s' ".tree-ring"
else
printf '%s' "$HOME/.local"

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

Under set -u, if the HOME environment variable is not set (which can happen in certain minimal, containerized, or non-interactive environments), referencing $HOME directly will cause the script to crash with an unbound variable error.

Using ${HOME:-} provides a safe fallback.

Suggested change
printf '%s' "$HOME/.local"
printf '%s' "${HOME:-}/.local"

Comment on lines +21 to +22
SQLiteMemoryStore::open(&db_path).map_err(|err| err.to_string())?;
let awareness = ensure_agent_awareness(root)?;

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

If the parent directory specified by root does not exist yet, calling SQLiteMemoryStore::open(&db_path) first will fail with a SQLite error (e.g., "unable to open database file").

Swapping these calls so that ensure_agent_awareness(root) runs first guarantees that the parent directory is created before SQLite attempts to open or create the database file.

Suggested change
SQLiteMemoryStore::open(&db_path).map_err(|err| err.to_string())?;
let awareness = ensure_agent_awareness(root)?;
let awareness = ensure_agent_awareness(root)?;
SQLiteMemoryStore::open(&db_path).map_err(|err| err.to_string())?;

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 helper in agent_awareness.rs does not quote paths containing spaces, unlike the implementation in welcome.rs. If the project path contains spaces, the generated commands in AGENTS.md will be malformed and fail when executed in a shell.

Align the implementation with welcome.rs to handle paths with spaces correctly.

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

@TerminallyLazy
TerminallyLazy merged commit ffbb33d into main Jul 5, 2026
1 check passed
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