Skip to content

About

AI-first assistant that turns recent Linear activity into evidence-backed product improvement recommendations

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

linear-scout

linear-scout is an open-source, AI-first assistant that reviews recent Linear activity and turns noisy project motion into evidence-backed product improvement opportunities. It is read-only by default — it never writes to your Linear workspace unless a future, explicitly-opted-in write command is run.

This repository implements Milestone 1 (read-only reports + draft recommendations), Milestone 2 (explicit, previewed Linear write commands), and Milestone 3 (learning: inferring label→app mappings from activity, plus a correction/feedback loop). Reads never mutate Linear; writes only happen behind an explicit --execute flag with a dry-run preview, a confirmation prompt, and an audit log.

Install

go install github.com/EricGrill/linear-scout/cmd/linear-scout@latest

Requires Go 1.22+.

Quick start

  1. Initialize configuration:

    linear-scout init

    This creates the user-local profile directory ($XDG_CONFIG_HOME/linear-scout/, or ~/.config/linear-scout/ on macOS/Linux and %AppData%\linear-scout\ on Windows) with a profile.yaml, and a shared linear-scout.yaml in the current directory.

  2. Add your secrets to profile.yaml (this file, and only this file, holds secrets — never commit it):

    linear_token: "lin_api_..."   # Linear Settings → API → Personal API keys (read scope)
    openai_key: "sk-..."          # OpenAI API key
  3. Validate credentials:

    linear-scout validate
  4. Generate a report:

    linear-scout report --since 7d --group-by project
    linear-scout report --since 24h --format json
    linear-scout report --since 2w --format telegram --limit 5
  5. Generate draft issue metadata (no writes to Linear):

    linear-scout create-drafts --since 7d
  6. Act on recommendations (Milestone 2 — dry-run by default):

    # Preview the issues that would be created (never writes):
    linear-scout preview --since 7d --team <TEAM_ID>
    
    # Create them for real (prompts for confirmation):
    linear-scout create-issues --since 7d --team <TEAM_ID> --execute
    
    # Add a comment or labels to an existing issue:
    linear-scout comment --issue ENG-123 --body "Flagged by linear-scout" --execute
    linear-scout label --issue ENG-123 --labels "needs-triage,product" --execute

    Add --yes to skip the confirmation prompt in automation. Every executed write is appended to audit.log in the profile directory.

  7. Teach it your workspace (Milestone 3 — improves grouping over time):

    # Infer label→app mappings from recent activity (dry-run):
    linear-scout learn run --since 30d
    
    # Apply the accepted mappings to your local profile:
    linear-scout learn run --since 30d --apply
    
    # Record a manual correction, or feedback on a recommendation:
    linear-scout correct --label frontend --app "Web App"
    linear-scout feedback --rec "Add upload retry" --reject
    
    # See what's been learned:
    linear-scout learn inspect

    Learned mappings are stored as plain JSON in the profile directory and are fed back into grouping on the next report/learn run, so classification of messy projects improves as you use the tool. Everything learned is inspectable and reversible via profile inspect|export|delete.

Commands

Command Purpose
init Create profile dir + template config files.
validate Check Linear and OpenAI credentials.
report Generate an AI recommendation report (--since, --group-by, --format, --limit).
create-drafts Produce reviewable draft issue metadata (no writes).
preview Dry-run of the issues create-issues would create (never writes).
create-issues Create Linear issues from drafts. Dry-run unless --execute.
comment Add a comment to an issue. Dry-run unless --execute.
label Add labels to an issue. Dry-run unless --execute.
learn run Infer label→app mappings from activity. Dry-run unless --apply.
learn inspect Show learned mappings + accept/reject decision counts.
correct Record a label→app correction into the profile.
feedback Record acceptance/rejection of a recommendation.
profile inspect|export|delete Inspect, export, or delete local learned profile state.

Configuration model

Settings are split into two layers:

  • Shared workspace config (linear-scout.yaml, safe to commit): grouping preferences, report formats, and the recommendation rubric. No secrets.
  • User-local profile ($XDG_CONFIG_HOME/linear-scout/, never committed): API tokens, provider credentials, and learned profile state stored as plain, inspectable JSON files.

See linear-scout.example.yaml for the shared config format.

Safety

linear-scout is read-only by default. report, create-drafts, and preview never mutate Linear. The write commands (create-issues, comment, label) are dry-run unless --execute is passed, and even then print a change summary, require confirmation (unless --yes), and record every change to an append-only audit.log.

By design the tool can only create issues, add comments, and add labels. It cannot close, reprioritize, or delete issues/comments, or broadly mutate existing content — those operations are not implemented.

Data sharing

Generating a report sends the selected window's Linear issue/comment text and metadata to the configured AI provider (OpenAI by default). See docs/provider-data-sharing.md for details.

Development

go test ./...
go build ./cmd/linear-scout

About

AI-first assistant that turns recent Linear activity into evidence-backed product improvement recommendations

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

⌂ Proxy