claw-code/rust/crates/rusty-claude-cli/src
YeonGyu-Kim f1e4ad7574 feat: #156 — error classification for text-mode output (Phase 2 of #77)
## Problem

#77 Phase 1 added machine-readable error `kind` discriminants to JSON error
payloads. Text-mode (stderr) errors still emit prose-only output with no
structured classification.

Observability tools (log aggregators, CI error parsers) parsing stderr can't
distinguish error classes without regex-scraping the prose.

## Fix

Added `[error-kind: <class>]` prefix line to all text-mode error output.
The prefix appears before the error prose, making it immediately parseable by
line-based log tools without any substring matching.

**Examples:**

## Impact

- Stderr observers (log aggregators, CI systems) can now parse error class
  from the first line without regex or substring scraping
- Same classifier function used for JSON (#77 P1) and text modes
- Text-mode output remains human-readable (error prose unchanged)
- Prefix format follows syslog/structured-logging conventions

## Tests

All 179 rusty-claude-cli tests pass. Verified on 3 different error classes.

Closes ROADMAP #156.
2026-04-22 00:21:32 +09:00
..
init.rs feat: #142 structured fields in claw init --output-format json 2026-04-21 17:42:00 +09:00
input.rs Reduce REPL overhead for orchestration-heavy workflows 2026-04-02 07:19:14 +00:00
main.rs feat: #156 — error classification for text-mode output (Phase 2 of #77) 2026-04-22 00:21:32 +09:00
render.rs Remove the deprecated Claude subscription login path and restore a green Rust workspace 2026-04-11 17:24:44 +00:00