[ux] User personas + 出力 mode 設計 (agent / researcher / CI / library) #14
Replies: 1 comment
|
Filed as external review by Claude (Anthropic, AI agent operating under souta's GitHub auth). 立場4 personas (Agent / Researcher / CI / Library) の分類は 妥当。 4 output modes (default / 但し以下 5 点で、 「TTY 検出による暗黙 mode 切替」 / 「MCP mode の strictness」 / 「persona D (library) の API 範囲」 / 「localization」 / 「失敗 mode の persona 別表現」が underspecified なので、 解像度を上げる提案をします。 1. Mode 決定の暗黙 fallback は事故源本文では
→ TTY 検出を fallback に降格 し、 explicit override を 1st choice にする: Mode resolution order:
理由: silent failure / corruption を生むのは**「human mode を期待していたら json が出た」**ような無自覚 swap。 Default = quiet なら誤解の余地が小さい。 2. MCP mode は strict isolation が必要本文 "MCP context: stdout = JSON-RPC structured、 stderr = log only" は正しいが、 実装上の hard requirement として以下を Phase 3 spec に lock:
これは MCP host (Claude Desktop / Cursor) が JSON-RPC parser に noise を食わせると agent が crash する死に方を防ぐ。 3. Persona D (library) の API spec を Phase 0 から lock本文 "library: typed Rust API、 stable semver" は方針として OK。 但し: Crate 構成提案理由:
Public API surface の Phase 0 commitmentpub trait Source { fn fetch(&self, r: &Ref, profile: &CapabilityProfile) -> Result<...>; }
pub trait Store { fn read(&self, key: &Safekey) -> Result<Option<Metadata>>;
fn write(&self, key: &Safekey, m: &Metadata) -> Result<()>; }
pub struct Ref { ... }
pub struct Safekey(String);
pub struct Metadata { ... }
pub struct CapabilityProfile { ... }これを Phase 0 で公開 spec として固定 ( 4. Localization は EN only に lock (少なくとも MVP まで)本文 open question 「絵文字 / Windows console compatibility」 とは別 layer の話として、 本 Discussion で localization を確定すべき:
→ Phase 0 から EN-only コミット。 後で日本語化したくなったら別 Discussion で明示的に reopen。 5. 絵文字 / 進捗 bar の default OFF を提案本文 open question への reviewer 回答:
6.
|
| Persona | 失敗の知らせ方 |
|---|---|
| Agent (MCP) | structured FetchResult { ok: false, error: { code, message } }、 throw しない |
| Researcher (CLI human) | colored stderr message + 進捗 bar の該当行赤字、 exit code 1 |
| CI (CLI json) | JSON Lines に {"ok": false, "error": ...}、 stdout は pure JSON のみ、 exit code = 失敗件数 (cap 255) |
| Library | Result<FetchResult, FetchError> (typed)、 anyhow ではなく thiserror |
これを docs/ERRORS.md に taxonomy として書く (どの error code がどの persona でどう見えるか matrix)。
Reviewer Decision proposal
- 4 personas + 4 output modes は keep
- Mode resolution: CLI flag > ENV > subcommand-implicit > TTY > default
quiet(TTY を fallback に降格) - MCP mode は stdout に noise 0 byte を Phase 3 で hard-enforce (clippy lint + tracing redirect + panic hook)
- crate を
doiget-core(lib) /doiget-cli/doiget-mcpの 3 分割 - Public API surface を
docs/PUBLIC_API.mdで Phase 0 から lock - Localization は EN only (MVP)、 日本語版 docs は別 Discussion で reopen 必要
- 絵文字 / 進捗 bar は default OFF、
NO_COLOR尊重 --quiet+--json同時指定で minimal JSON fielddocs/ERRORS.mdで persona × error code matrix
最終 Decision 権は author に留保。
Reviewer: Claude (Anthropic). Filed 2026-05-05.
Uh oh!
There was an error while loading. Please reload this page.
Question
doiget の user persona と、各 persona に対する UX / 出力 mode。
Personas
A. Agent (Claude Desktop / Cursor / Codex / Continue)
B. Researcher (souta 自身、その他物理屋)
doiget fetch ...)C. CI / Batch processor
doiget batch refs.txt --json)D. Vault maintainer (BiblioFetch.jl との共有 store を運用する人)
doigetを Rust crate として直接 use)Output modes
--json--quiet/-qservemodeOpen questions
indicatifで確定?--quietと--jsonの優先順序:--quiet --jsonで何が出る?Decision
???
All reactions