Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ This changelog is automatically generated by AI when releases are published.

## [Unreleased]

## [3.10.0] - 2026-11-15

### Added

- **`autter lineage <issue-id>`: from a Runtime issue to the release, commit, PR, owner and AI authorship behind it.** Until now the CLI could explain one line (`autter blame --why`) but not a production error: going from an issue to the code behind it meant the issue page. `autter lineage ri_…` prints the chain top to bottom: the issue (title, service, environment, status, first seen); the release it first appeared in, the commit it runs and the release before it, or plainly that the commit is not known; the suspect PR; the owner (assigned, else the suggestions); the suspect commits, including those an AI agent wrote with no human author ("written by Claude, no human author"); who wrote each failing frame ("Claude (model …) in commit abc1234, edited by a person since", a person's name, or "Not known: no authorship notes", never a person by default), with the function's AI share and "Line numbers are approximate" when the line was matched on a best-effort basis; and why the error was grouped into this issue. For a frame whose agent transcript is stored it prints the `autter show-prompt <session>` command to run; it never prints prompt text. It uses the sign-in and `--org` of `autter ask`; `--repo <name>` finds the issue only in that repository, and `--json` prints the response for scripts. A part Autter could not read prints one line saying so, with the reason, and the command still exits 0. No one is shown by email address. It needs the Autter API with the lineage route (deployed). See [docs/system-investigations.md](docs/system-investigations.md).
- `autter lineage <file>:<line>` is `autter blame --why <file>:<line>`, through the same code.
- `autter ask --help` now says it answers "why did this happen" and "what is the impact" questions from Runtime evidence.

## [3.9.3] - 2026-11-14

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resolver = "3"

[package]
name = "autter"
version = "3.9.3"
version = "3.10.0"
edition = "2024"
default-run = "autter"

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ Details: autter show-prompt s_3f9a2c1d | autter blame --why src/log_fmt/author
3. **`autter show-prompt <ref>`** prints the full prompt record as JSON: agent, model, session, line counts, the commit whose note holds it, and the transcript. It takes the short reference, a full session ID (`s_` + 14 hex), an older 16-hex prompt hash, any unique prefix of 4+ hex characters, or the agent's own session ID. `autter show-prompt --help` lists where each ID appears.
4. **`git show <commit>`** is the change itself.

`autter lineage <file>:<line>` is the same as `autter blame --why <file>:<line>`. From a production error instead of a line, `autter lineage <issue-id>` walks a Runtime issue back to its release, commit, PR and owner, and says which failing frames an AI agent wrote (see [System investigations](docs/system-investigations.md)).

Transcripts are read from this machine first, then from the Autter platform when you are connected and signed in. When one can't be shown, `--why` and `show-prompt` (in `transcript.reason`) say why: none was recorded, it stayed on the machine that made the commit (local mode), or you need to sign in. Notes made on other machines arrive with `autter fetch-notes`. The web app has no page per prompt or session yet, so there is no link to one.

<img align="right" width="350" alt="Autter VS Code extension showing color-coded AI blame in the gutter" src="https://github.com/user-attachments/assets/94e332e7-5d96-4e5c-8757-63ac0e2f88e0" />
Expand Down Expand Up @@ -408,7 +410,7 @@ Apache 2.0

### System investigations

Use `autter ask` for evidence-backed system questions, `autter logs` for structured Runtime log queries, and `autter threads` to search and resume the same private debugging history as Dashboard Ask. See [usage and examples](docs/system-investigations.md).
Use `autter ask` for evidence-backed system questions ("why did this happen and what is the impact"), `autter lineage <issue-id>` to go from a Runtime issue to the release, commit, PR, owner and AI authorship behind it, `autter logs` for structured Runtime log queries, and `autter threads` to search and resume the same private debugging history as Dashboard Ask. See [usage and examples](docs/system-investigations.md).

### Repository memory

Expand Down
60 changes: 60 additions & 0 deletions docs/system-investigations.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,72 @@ autter logs --repo checkout --severity error --service api --since 1h
autter logs --repo checkout --field attributes.http.request.method=POST --filter status_code:gte:500
autter threads search "connection pool"
autter threads show <thread-id>
autter lineage <issue-id>
```

Questions use captured Runtime evidence and source code to explain root causes, impact, and recommended fixes. Hypotheses and telemetry gaps should be explicit. Threads are saved automatically; you can resume them from Dashboard or CLI. Historical conclusions need fresh evidence before reuse.

Use `--org <slug>` for another organization you belong to and `--json` for complete structured output. `--mode codebase` and `--mode reviews` select the existing assistants. Resuming with `--thread` restores that thread's mode and repository unless you explicitly specify them; changing its scope requires a new thread.

## From a Runtime issue to the code behind it

`autter lineage <issue-id>` prints the chain behind one Runtime issue (its id starts with `ri_`), top to bottom:

```sh
autter lineage ri_0123456789abcdef0123456789
autter lineage ri_0123456789abcdef0123456789 --repo shop --json
autter lineage src/orders.ts:42 # the same as autter blame --why src/orders.ts:42
```

```text
Issue ri_0123456789abcdef0123456789: TypeError: Cannot read properties of undefined (reading 'id')
service checkout-api · environment production · status open · first seen 2026-11-14 09:12 UTC
Repository: acme/shop

Release
First seen in release v2.4.1
Commit 3f9a2c1 (from GitHub release v2.4.1)
https://github.com/acme/shop/commit/3f9a2c1d4e5f60718293a4b5c6d7e8f901234567
Before it: release v2.4.0, commit 1a2b3c4

Pull request
#482 Cache order lookups (from suspect commit S1)
https://github.com/acme/shop/pull/482

Owner
Assigned: Jane Doe, team payments, via CODEOWNERS: src/orders/ @acme/payments

Suspect commits
S1 3f9a2c1 Cache order lookups
by Jane Doe (@janedoe) with Claude · PR #482 · in the release window · 2026-11-13 18:00 UTC
Why: Changed the failing line orders.ts:42.
S2 9e8d7c6 Refactor order handler
written by Claude, no human author · in the release window
Why: Changed the failing function handler.

Who wrote the failing code
src/orders.ts:42 in handler
Claude (model claude-opus-4-5) in commit 3f9a2c1, edited by a person since
Run by Jane Doe
Function handler (lines 30-60): 25 of 31 lines written by AI
Prompt: autter show-prompt s_3f9a2c1d4e5f60::t_0a1b2c3d4e5f60
src/db.ts:10 in query
Sam Lee in commit 1a2b3c4
Line numbers are approximate.
src/util.ts:5
Not known: no authorship notes

Why this error was grouped into this issue
Grouped by its top frames: handler@orders.ts, query@db.ts.
```

- **Release and commit**: the release the error first appeared in, the commit it runs and the release before it. When no commit is known for the release, it says so, and code was read at the default branch.
- **Suspect commits** include commits an AI agent wrote with no human author ("written by Claude, no human author"); they are never assigned an owner, since there is no person to assign.
- **Who wrote the failing code** joins up to three failing frames to the Autter authorship notes of the commit that ran: an agent and its model (and whether a person edited the line since), a person, or "Not known: no authorship notes" when the commit has none. Missing notes never count as a person. "Line numbers are approximate" means the line was matched to the deployed commit on a best-effort basis. When the agent's transcript is stored, the command prints the `autter show-prompt` command for it; it never prints prompt text itself, and `show-prompt` applies its usual access rules.
- A part Autter could not read prints one line saying so, with the reason, and the command still exits 0. No one is shown by email address.

`--repo <name>` only finds the issue in that repository (`Unknown repository: <name>` when Autter has none by that name); without it, any repository in the organization. `--org <slug>` and `--json` (the response as JSON, for scripts) work as for `autter ask`. Errors exit 1: not signed in or the wrong organization (run `autter login`, or pass `--org`), an issue that is not in this organization or repository, or the API unreachable.

`autter logs` supports severity, service, environment, message search, ISO `--from`/`--to` dates, relative `--since` durations, and repeated field filters combined with AND. Custom fields use `attributes.<exact key>`. Operators are `eq`, `neq`, `contains`, `gt`, `gte`, `lt`, `lte`, and `exists`. Default: last 24 hours, 50 events. Maximum: 90 days, 200 events. Tables abbreviate long cells; `--json` returns full fields including traces and occurrence IDs.

`autter threads` searches questions and answers, with 50 sessions per page. Use `--offset 50` for the next page. Threads are private to your account in the selected organization. New persistence cannot recover older browser-only conversations.
Expand Down
30 changes: 29 additions & 1 deletion src/commands/arg_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ autter login [--token <token>]
name: "ask",
aliases: &[],
summary: "Investigate your system with Runtime evidence",
body: "autter ask <question> [--repo <name>] [--org <slug>] [--thread <id>] [--mode system|codebase|reviews] [--json]\n\n Get root causes, impact, and recommended fixes. Questions and answers are\n saved in the same private thread history as Dashboard Ask. Use --thread to resume.\n Sign in with autter login. Default mode: system.",
body: "autter ask <question> [--repo <name>] [--org <slug>] [--thread <id>] [--mode system|codebase|reviews] [--json]\n\n Get root causes, impact, and recommended fixes. Ask it \"why did this happen\"\n and \"what is the impact\" questions: it answers them from Runtime evidence.\n Questions and answers are saved in the same private thread history as Dashboard Ask. Use --thread to resume.\n Sign in with autter login. Default mode: system.",
},
HelpEntry {
name: "logs",
Expand All @@ -894,6 +894,34 @@ autter login [--token <token>]
summary: "Search and read saved debugging investigations",
body: "autter threads [search <keywords>] [--repo <name>] [--org <slug>] [--offset <n>] [--json]\nautter threads show <id> [--org <slug>] [--json]\n\n Search your questions and answers across Dashboard and CLI. Lists 50 threads\n at a time. Continue an investigation with autter ask <question> --thread <id>.",
},
HelpEntry {
name: "lineage",
aliases: &[],
summary: "From a Runtime issue to its release, commit, PR, owner and AI authorship",
body: "\
autter lineage <issue-id> [--repo <name>] [--org <slug>] [--json]
autter lineage <file>:<line>

<issue-id> Print the chain behind a Runtime issue (its id, ri_...), top to
bottom: the issue; the release it first appeared in and the
commit it runs (and the release before it); the suspect PR;
the owner (assigned, else suggested); the suspect commits,
marking those an AI agent wrote with no human author; who wrote
each failing frame (an agent and model, a person, or not known
when the commit has no authorship notes), with the function's
AI share; and why the error was grouped into this issue. When
an agent's transcript is stored, prints the `autter show-prompt`
command for it; prompt text is never printed here.
<file>:<line> Explain one line of code: the same as
`autter blame --why <file>:<line>`.

--repo <name> Only an issue in this repository (as Autter names it)
--org <slug> Another organization you belong to
--json The response as JSON, for scripts

Uses your autter login. A part Autter could not read prints one line saying
so; the command still exits 0. No one is shown by email address.",
},
HelpEntry {
name: "memory",
aliases: &[],
Expand Down
15 changes: 14 additions & 1 deletion src/commands/autter_handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ pub fn handle_autter(args: &[String]) {
| "memory"
| "context"
| "mcp"
);
) || (args[0] == "lineage"
&& commands::lineage::blame_why_args(&args[1..]).is_none());
// A help request never needs the background service: `stats --help` used
// to fail when it was unreachable while `--help stats` worked.
let needs_daemon = !help_requested && !works_without_daemon;
Expand Down Expand Up @@ -206,6 +207,17 @@ pub fn handle_autter(args: &[String]) {

match args[0].as_str() {
"ask" | "logs" | "threads" => commands::ask::handle(&args[0], &args[1..]),
// `lineage <issue-id>` reads the issue's lineage from Autter;
// `lineage <file>:<line>` is `blame --why <file>:<line>`.
"lineage" => match commands::lineage::blame_why_args(&args[1..]) {
Some(blame_args) => {
handle_ai_blame(&blame_args);
if is_interactive_terminal() {
log_message("blame", "info", None)
}
}
None => commands::lineage::handle(&args[1..]),
},
"memory" => commands::memory::handle(&args[1..]),
"context" => commands::context::handle(&args[1..]),
"mcp" => commands::mcp::handle(&args[1..]),
Expand Down Expand Up @@ -487,6 +499,7 @@ const AUTTER_COMMANDS: &[&str] = &[
"help",
"install",
"install-hooks",
"lineage",
"log",
"login",
"logout",
Expand Down
Loading
Loading