메뉴
HN
Hacker News 22일 전

AI 에이전트를 위한 깃(Git), Regent

IMP
8/10
핵심 요약

AI 에이전트의 모든 동작을 자동으로 추적하고 버전 관리해주는 새로운 오픈소스 도구인 Regent가 소개되었습니다. 개발자는 수동 커밋 없이도 에이전트가 변경한 코드 내역과 어떤 프롬프트가 해당 코드를 작성했는지 'rgt blame' 기능을 통해 추적할 수 있으며, 문제 발생 시 이전 단계로 되돌리는 'rewind' 기능도 곧 지원될 예정입니다.

번역된 본문

AI 에이전트를 위한 깃(Git): AI 에이전트 활동을 위한 버전 관리 시스템입니다. 에이전트가 수행한 작업을 추적하고, 각 코드 라인을 작성한 프롬프트를 확인하며, 문제가 발생했을 때 이전 상태로 되돌릴 수 있습니다.

데모: 모든 도구 호출(tool call)이 자동으로 캡처되며, 수동 커밋은 필요하지 않습니다.

빠른 시작:

Homebrew를 통한 설치 (macOS/Linux)

brew tap regent-vcs/tap brew install regent

또는 Go를 통한 설치

go install github.com/regent-vcs/regent/cmd/rgt@latest

프로젝트 초기화

cd your-project rgt init

Claude Code를 평소처럼 사용합니다 (모든 도구 호출이 추적됩니다)

작업 기록 확인

rgt log rgt blame src/file.go:42

이게 전부입니다. 이제 에이전트의 모든 활동을 감사(Auditable)할 수 있습니다.

[무엇을 얻을 수 있나요?] 에이전트가 실제로 한 일을 확인하세요: $ rgt log Step a1b2c3d | 2분 전 | Tool: Edit │ 파일: src/handler.go │ 요청 핸들러에 에러 처리 추가 │ + 5줄, - 2줄 Step d4e5f6g | 5분 전 | Tool: Write │ 파일: tests/handler_test.go │ 핸들러 유닛 테스트 생성 │ + 23줄 Step f8g9h0i | 8분 전 | Tool: Bash │ 명령어: go mod tidy │ 의존성 정리

Blame: 어떤 프롬프트가 이 줄을 작성했을까요? $ rgt blame src/handler.go:42 Line 42: func handleRequest(w http.ResponseWriter, r * http.Request) { Step: a1b2c3d4e5f6 Session: claude-20260502-143021 Tool: Edit Prompt: " 요청 핸들러에 에러 처리 추가 "

여러 동시 세션 추적: $ rgt sessions Active Sessions: claude-20260502-143021 | 3단계 | 마지막 활동: 2분 전 claude-20260502-091534 | 7단계 | 마지막 활동: 2시간 전

$ rgt log --session claude-20260502-143021 # 세션별 기록 필터링

변경 사항에 대한 전체 맥락 확인: $ rgt show a1b2c3d Step a1b2c3d4e5f6 Parent: d4e5f6g7h8i9 Session: claude-20260502-143021 Time: 2026-05-02 14:30:21 Tool: Edit File: src/handler.go Changes:

  • func handleRequest(w http.ResponseWriter, r * http.Request) {
  • if r.Method != " GET " {
  • http.Error(w, " Method not allowed " , 405)
  • return
  • }
  • func handleRequest(w http.ResponseWriter, r * http.Request) { Conversation: User: " GET 요청이 아닌 것을 거부하는 에러 처리 추가 " Assistant: " 핸들러에 메서드 검증을 추가하겠습니다... "

[왜 이 도구가 필요한가?] 문제: AI 에이전트에는 자체적인 버전 관리 시스템이 없습니다. 다음과 같은 고통을 알 것입니다: "5분 전까지만 해도 잘 작동했는데", "왜 그 파일을 변경한 거야?", "리팩토링 전으로 돌아가", /compact 명령어 치고 기도하기, 새 채팅창에 코드 복사-붙여넣기 하기.

해결책: 이미 존재했어야 할 세 가지 기본 기능: rgt log — 이 세션에서 무엇을 했는가? rgt blame — 어떤 프롬프트가 이 줄을 작성했는가? rgt rewind — 이전 단계로 복원 (출시 예정)

우리는 AI 에이전트에게 코드베이스 쓰기 권한을 주었지만, 그것을 관리할 깃(Git)은 우리 자신에게 주지 않았습니다. re_gent가 이 문제를 해결합니다.

[작동 방식] re_gent는 에이전트 활동을 .git/과 유사한 .regent/ 디렉토리에 저장합니다: .regent/ ├── objects/ # 콘텐츠 주소 지정 블롭 (BLAKE3) ├── refs/ # 세션 포인터 (에이전트당 하나) ├── index.db # SQLite 쿼리 인덱스 └── config.toml

모든 도구 호출은 하나의 Step을 생성합니다: Step { parent : < previous - step - hash > tree : < workspace - snapshot > transcript : < conversation - delta > cause : { tool_name : "Edit" args : < what - changed > result : < tool - output > } session_id : "claude-20260502-143021" timestamp : "2026-05-02T14:30:21Z" }

이러한 Step들은 DAG(방향성 비순환 그래프)를 형성합니다. 각 세션은 고유한 브랜치를 가집니다. 공통 조상은 중복 제거됩니다. 이를 통해 AI 에이전트 활동에 대해 깃(Git) 수준의 감사 기능을 제공합니다. 기술적 세부 사항은 전체 사양을 위해 POC.md를 참조하세요.

[설치 방법] Homebrew를 통한 설치 (macOS/Linux) brew tap regent-vcs/tap brew install regent 이 명령은 regent와 rgt 명령어(두 개는 동일함)를 모두 설치하며, bash, zsh, fish를 위한 셸 자동완성을 자동으로 설정합니다.

Go Install을 통한 설치 go install github.com/regent-vcs/regent/cmd/rgt@latest rgt 명령어를 설치합니다.

셸 자동완성 (수동 설정):

Bash

rgt completion bash > /usr/local/etc/bash_completion.d/rgt

Zsh

rgt completion zsh > " ${fpath[1]} /_rgt "

Fish

rgt completion fish > ~ /.config/fish/completions/rgt.fish

소스에서 빌드: git clone https://github.com/regent-vcs/regent cd regent go build -o rgt ./cmd/rgt sudo mv rgt /usr/local/bin/

선택적으로 심볼릭 링크 생성: sudo ln -s /usr/local/bin/rgt /usr/local/b

원문 보기
원문 보기 (영어)
Git for AI Agents Version control for AI agent activity. Track what your agent did, which prompt wrote each line, and rewind when things break. Demo Every tool call is automatically captured. No manual commits needed. Quick Start # Install via Homebrew (macOS/Linux) brew tap regent-vcs/tap brew install regent # Or via Go go install github.com/regent-vcs/regent/cmd/rgt@latest # Initialize in your project cd your-project rgt init # Work with Claude Code normally (every tool call is tracked) # See what happened rgt log rgt blame src/file.go:42 That's it. Your agent activity is now auditable. What You Get See what your agent actually did $ rgt log Step a1b2c3d | 2 min ago | Tool: Edit │ File: src/handler.go │ Added error handling to request handler │ + 5 lines, - 2 lines Step d4e5f6g | 5 min ago | Tool: Write │ File: tests/handler_test.go │ Created unit tests for handler │ + 23 lines Step f8g9h0i | 8 min ago | Tool: Bash │ Command: go mod tidy │ Cleaned up dependencies Blame: which prompt wrote this line? $ rgt blame src/handler.go:42 Line 42: func handleRequest(w http.ResponseWriter, r * http.Request) { Step: a1b2c3d4e5f6 Session: claude-20260502-143021 Tool: Edit Prompt: " Add error handling to the request handler " Track multiple concurrent sessions $ rgt sessions Active Sessions: claude-20260502-143021 | 3 steps | Last: 2 min ago claude-20260502-091534 | 7 steps | Last: 2 hours ago $ rgt log --session claude-20260502-143021 # Filter history by session See full context for any change $ rgt show a1b2c3d Step a1b2c3d4e5f6 Parent: d4e5f6g7h8i9 Session: claude-20260502-143021 Time: 2026-05-02 14:30:21 Tool: Edit File: src/handler.go Changes: + func handleRequest(w http.ResponseWriter, r * http.Request) { + if r.Method ! = " GET " { + http.Error(w, " Method not allowed " , 405) + return + } - func handleRequest(w http.ResponseWriter, r * http.Request) { Conversation: User: " Add error handling to reject non-GET requests " Assistant: " I'll add method validation to the handler... " Why This Exists The problem: AI agents have no version control of their own. You know this pain: "It was working five minutes ago" "Why did you change that file?" "Go back to before the refactor" /compact and pray Copy-pasting code into a fresh chat The solution: Three primitives that should already exist: rgt log — what did this session do? rgt blame — which prompt wrote this line? rgt rewind — restore to any previous step (coming soon) We gave agents write access to our codebases. We did not give ourselves git for it. re_gent fixes that. How It Works re_gent stores agent activity in .regent/ (like .git/ ): .regent/ ├── objects/ # Content-addressed blobs (BLAKE3) ├── refs/ # Session pointers (one per agent) ├── index.db # SQLite query index └── config.toml Every tool call creates a Step : Step { parent : < previous - step - hash > tree : < workspace - snapshot > transcript : < conversation - delta > cause : { tool_name : "Edit" args : < what - changed > result : < tool - output > } session_id : "claude-20260502-143021" timestamp : "2026-05-02T14:30:21Z" } Steps form a DAG . Each session has its own branch. Common ancestors dedupe. You get git-level auditability for agent activity. Technical details: See POC.md for the complete specification. Installation Via Homebrew (macOS/Linux) brew tap regent-vcs/tap brew install regent This installs both regent and rgt commands (they're identical) and automatically sets up shell completions for bash, zsh, and fish. Via Go Install go install github.com/regent-vcs/regent/cmd/rgt@latest This installs the rgt command. Shell Completion (manual setup): # Bash rgt completion bash > /usr/local/etc/bash_completion.d/rgt # Zsh rgt completion zsh > " ${fpath[1]} /_rgt " # Fish rgt completion fish > ~ /.config/fish/completions/rgt.fish From Source git clone https://github.com/regent-vcs/regent cd regent go build -o rgt ./cmd/rgt sudo mv rgt /usr/local/bin/ # Optionally create a symlink: sudo ln -s /usr/local/bin/rgt /usr/local/bin/regent For shell completion, follow the "Via Go Install" instructions above. Binary Releases Download pre-built binaries from GitHub Releases Editor Integration VSCode Extension Get inline blame annotations directly in your editor: Installation Options: # 1. From VSIX (Recommended) # Download the latest .vsix from: # https://github.com/regent-vcs/vscode-regent/releases # Then in VS Code: Extensions > ... > Install from VSIX... # 2. From VS Code Marketplace (Coming Soon) # Search for "re_gent Blame" # 3. From source (Development) git clone https://github.com/regent-vcs/vscode-regent cd vscode-regent npm install && npm run compile # Press F5 in VS Code to launch Extension Development Host Features: Inline blame annotations showing which step modified each line Hover tooltips with full step context (timestamp, tool name, arguments) Session timeline view in the sidebar One-click access to conversation history Direct SQLite integration—no subprocess overhead Requirements: re_gent CLI must be installed and rgt init run in your project. View Extension Docs → Commands Available Now: Command Description rgt init Initialize .regent/ in current directory rgt log Show step history (supports --session , -n , --since ) rgt sessions List all active sessions rgt status Show current repository state rgt show <step> Display full context for a step (tool call + conversation) rgt blame <path>[:<line>] Show per-line provenance for a file rgt cat <hash> Inspect any object by hash (debug) rgt version Print version information rgt completion Generate shell completion scripts Coming Soon: Command Description rgt rewind <step> Non-destructive time-travel rgt gc Garbage collection rgt fork <step> Create a new session from a step Features Content-Addressed Storage — BLAKE3 hashing, automatic deduplication Fast Queries — SQLite index, sub-10ms lookups Per-Session DAG — Concurrent agents, no conflicts Conversation Tracking — Survives /compact and /clear Hook-Driven — Transparent Claude Code integration Concurrency-Safe — CAS refs, ACID transactions Gitignore-Compatible — .regentignore support re_gent vs Git Git re_gent Tracks code ✅ ✅ Tracks agent activity ❌ ✅ Blame with prompt ❌ ✅ Conversation history ❌ ✅ Concurrent sessions ⚠️ conflicts ✅ separate branches Purpose Developer VCS Agent audit trail re_gent complements git, doesn't replace it. Use both. Status Active Development ~7.8k LOC Go implementation Core functionality: init, log, sessions, status, show, blame — COMPLETE Hook integration (Claude Code) — COMPLETE Used daily by contributors Not yet v1.0 Honest assessment: Production-quality code at POC-level feature completeness. We're building in public. Contributing Contributions are welcome! re_gent is built in public and we actively review PRs. Quick Start: Read QUICK_START.md for a 5-minute setup guide Check good first issues Full guidelines: CONTRIBUTING.md Before opening a PR: Tests pass: go test ./... and go test -race ./... Linter passes: golangci-lint run Code formatted: go fmt ./... PR template filled out Important files: CONTRIBUTING.md — Full contribution guide SUPPORT.md — Support and help resources TESTING.md — Testing guide and strategy CLAUDE.md — Project context and architecture POC.md — Technical specification Built With cobra — CLI framework blake3 — BLAKE3 hashing go-diff — Myers diff modernc.org/sqlite — Pure Go SQLite License Apache License 2.0 Built by contributors Discussions • Issues • Technical Spec