HN 표시: Oo – 코딩 에이전트에 대한 출력 압축(화물 테스트 → "47 통과, 2.1초")
hackernews
|
|
📦 오픈소스
#claude
#command r
#tip
#자동화
#출력 압축
#컨텍스트 최적화
#코딩 에이전트
#테스트
원문 출처: hackernews · Genesis Park에서 요약 및 분석
요약
**oo**는 AI 코딩 에이전트의 불필요한 토큰 낭비를 줄이기 위해 개발된 도구로, 명령어를 대체하지 않고 감싸서 실행 결과를 효율적으로 압축합니다. 이는 `cargo test` 같은 명령어의 수천 줄 출력을 "47 passed, 2.1s"와 같은 간결한 요약으로 변환하여 에이전트가 핵심 신호만 수신하도록 돕습니다. 또한 실패 시에는 유용한 에러 정보를 제공하고, 큰 데이터는 인덱싱하여 필요 시 조회할 수 있게 합니다.
본문
██████ ██████ ███▒▒███ ███▒▒███ ▒███ ▒███▒███ ▒███ ▒███ ▒███▒███ ▒███ ▒▒██████ ▒▒██████ ▒▒▒▒▒▒ ▒▒▒▒▒▒ "Double-o, agent's best friend." Or: how I learned to stop worrying and love my context-efficient command runner for AI coding agents. AI coding agents waste context tokens on verbose command output. A single cargo build can produce thousands of lines that the agent must process but rarely needs in full. oo solves this transparently: - Commands run normally — oo wraps them, not replaces them - Output is classified and compressed using patterns - Agents get the signal (pass/fail, errors, summaries) without the noise - No agent modification required — just prefix commands with oo Unlike manual truncation (head /tail ), oo understands command semantics. Unlike agent-native output limits, oo preserves the information the agent actually needs. AI agents see everything you print. A cargo test run producing 8 KB of output costs the agent hundreds of tokens just to learn "tests passed." Multiply that across a session and the context window fills with noise, not signal. oo runs commands for you and collapses their output to what the agent actually needs. Without oo: Your agent receives the full output. $ cargo test Compiling myapp v0.1.0 (/path/to/myapp) Finished test [unoptimized + debuginfo] target(s) in 0.52s Running unittests src/lib.rs (target/debug/deps/myapp) running 47 tests test auth::tests::login_success ... ok test auth::tests::login_invalid_password ... ok test db::tests::connection_pool ... ok ... 44 more tests ... test result: ok. 47 passed; 0 failed; finished in 2.1s With oo: Your agent gets the signal. $ oo cargo test ✓ cargo test (47 passed, 2.1s) Large output with a known success pattern collapses to a single summary line. When things fail: Actionable errors, no noise. $ oo pytest tests/ ✗ pytest FAILED tests/test_api.py::test_login - AssertionError: expected 200, got 401 FAILED tests/test_api.py::test_create_user - ValueError: email already exists === 2 failed, 45 passed in 1.8s === Failure output is filtered to the actionable tail. Large unrecognised output: Indexed for retrieval. $ oo gh issue list ● gh (indexed 47.2 KiB → use `oo recall` to query) Query indexed output with oo recall "" . Small outputs pass through unchanged. Output handling depends on command category: content commands like git show and git diff always pass through regardless of size, while data commands like git log and ls are indexed when large. See the patterns guide for details. Download from GitHub Releases: # macOS (Apple Silicon) curl -LO https://github.com/randomm/oo/releases/latest/download/double-o-aarch64-apple-darwin.tar.xz tar xf double-o-aarch64-apple-darwin.tar.xz sudo mv double-o-aarch64-apple-darwin/oo /usr/local/bin/ # Linux (x86_64) curl -LO https://github.com/randomm/oo/releases/latest/download/double-o-x86_64-unknown-linux-gnu.tar.xz tar xf double-o-x86_64-unknown-linux-gnu.tar.xz sudo mv double-o-x86_64-unknown-linux-gnu/oo /usr/local/bin/ # Linux (ARM64) curl -LO https://github.com/randomm/oo/releases/latest/download/double-o-aarch64-unknown-linux-gnu.tar.xz tar xf double-o-aarch64-unknown-linux-gnu.tar.xz sudo mv double-o-aarch64-unknown-linux-gnu/oo /usr/local/bin/ cargo install double-o git clone https://github.com/randomm/oo.git cd oo cargo build --release cp target/release/oo /usr/local/bin/ | Command | Description | |---|---| oo [args...] | Run a shell command with context-efficient output | oo recall | Search indexed output from this session | oo forget | Clear all indexed output for this session | oo learn [args...] | Run command and teach oo a new output pattern via LLM | oo help | Fetch a cheat sheet for cmd from cheat.sh | oo init | Generate .claude/hooks.json and print AGENTS.md snippet | oo version | Print version | Note: oo help sources from cheat.sh which covers common Unix tools. For modern CLIs not yet in cheat.sh (e.g.,gh ,kamal ), useoo learn to teachoo the command's output patterns. Add this to your system prompt or CLAUDE.md : Prefix all shell commands with `oo`. Use `oo recall ""` to search large outputs. That's it. The agent runs oo cargo test , gets ✓ cargo test (47 passed, 2.1s) , and moves on. oo ships with 10 patterns that match commands automatically: | Command | Success | Failure strategy | |---|---|---| pytest | {passed} passed, {time}s | tail 30 lines | cargo test | {passed} passed, {time}s | tail 40 lines | go test | ok ({time}s) | tail 30 lines | jest / vitest | {passed} passed, {time}s | tail 30 lines | ruff check | quiet (no output on pass) | smart truncate | eslint | quiet | smart truncate | cargo build | quiet | head 20 lines | go build | quiet | head 20 lines | tsc | quiet | head 20 lines | cargo clippy | quiet | smart truncate | Add your own patterns with oo learn (generates a TOML pattern file via LLM) or write one manually in ~/.config/oo/patterns/ . What if oo doesn't recognize my command? Unknown commands pass through unchanged (under 4KB) or get indexed for late
Genesis Park 편집팀이 AI를 활용하여 작성한 분석입니다. 원문은 출처 링크를 통해 확인할 수 있습니다.
공유