← Back to Pull requests

feat: user-level install target and directory option for agents #12

Open
unknown opened this pull request with 251 lines diff across 3 files
View on GitHub
unknown unknown commented on Nov 17, 2026 14:51 UTC
Author

This pull request introduces a new feature to the swayve CLI, allowing users to specify a working directory for agent terminals with the --dir option. It also refactors the Makefile for improved usability and adds a new installation target. The most significant changes are grouped below:

New CLI Feature: Agent Working Directory

Added a --dir option to the Agent command in cli.rs so users can specify the working directory for new agent terminals. If not provided, it defaults to the current directory.
Implemented the resolve_spawn_dir function to resolve and validate the working directory, ensuring it exists and is a directory. This function is used when spawning agent terminals. [[1]](diffhunk://#diff-abb915476b033b6bb363ff7f39c074bc8a6ae81c11070b28b9cc781772edd2a2R249-R255) [[2]](diffhunk://#diff-abb915476b033b6bb363ff7f39c074bc8a6ae81c11070b28b9cc781772edd2a2R313) [[3]](diffhunk://#diff-abb915476b033b6bb363ff7f39c074bc8a6ae81c11070b28b9cc781772edd2a2R600-R610)
Added unit tests for resolve_spawn_dir to verify correct handling of default, relative, and invalid paths.

Makefile Improvements

Refactored the Makefile to provide concise help output, added descriptions for each target, and set the default goal to help.

  • Added a new install-user target to install swayve and swayve-hud to ~/.local/bin without requiring sudo, with the ability to override the install root.
  • <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

  • New Features

  • - Spawned terminal sessions can now start in a specified working directory. If none is provided, they start in the current directory.
    - Added a user-level installation option for installing the application and HUD under a configurable location.
    - The build tool’s help command is now the default and provides updated target descriptions.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 251 lines (+188 / -63) across 3 files Reviewer: coderabbitai[bot] Review duration: 7m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.39) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 251 lines diff across 3 files
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.331
    Real PR Conversation Timeline
    1 comments
    "Review active on #12"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39% (MEDIUM) · Higher = larger blast radius
    39%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 20.8% · Safe to merge
    20.8%
    Repository