콘텐츠로 이동

동작 방식

이 페이지는 report 뒤의 동작을 설명합니다. 무엇을 local 에서 수집하고, 무엇을 git note 로 남기며, 그 data 가 PR Report 와 Dashboard 에 어떻게 도착하는지 확인할 수 있습니다. Agent Note 를 쓰는 데 모든 세부사항을 외울 필요는 없지만, 결과가 예상과 다를 때 돌아올 model 입니다.

생성된 git hook 이 설치되어 있으면 대부분의 리포지토리에서는 평소처럼 git commitgit push 를 쓰면 됩니다. Cursor 는 local transcript 에서 prompt / response 쌍을 복원할 수 있고, git hook 을 쓸 수 없어도 shell hook 으로 commit 추적을 이어갈 수 있습니다.

레이어 1: 로컬 임시 데이터

.git/agentnote/sessions/ 안의 세션 데이터. prompt, 변경 내역, blob hash 를 담는 JSONL 파일입니다. 각 commit 뒤에 rotate 되며 push 되지 않습니다.

레이어 2: Git Notes

refs/notes/agentnote 안의 영구 기록. commit 당 하나의 JSON. push, fetch, 팀 공유가 가능합니다.

파일목적
prompts.jsonlturn 번호와 함께 한 줄에 하나의 prompt
changes.jsonlAI 가 수정한 파일과 post-edit blob hash
pre_blobs.jsonl각 AI edit 이전의 file 상태
heartbeat세션 활동 시각
turnprompt 마다 증가하는 단조 증가 카운터
{
"v": 1,
"agent": "claude",
"session_id": "a1b2c3d4-...",
"timestamp": "2026-04-02T10:30:00Z",
"model": "claude-sonnet-4-20250514",
"interactions": [
{
"prompt": "JWT auth middleware 구현",
"contexts": [
{ "kind": "reference", "source": "previous_response", "text": "이전 response 가 이 middleware 를 바꿔야 하는 이유를 설명합니다." }
],
"selection": {
"schema": 1,
"source": "primary",
"signals": ["primary_edit_turn"]
},
"response": "middleware 를 만들겠습니다...",
"files_touched": ["src/auth.ts"],
"tools": ["Edit"]
}
],
"files": [
{ "path": "src/auth.ts", "by_ai": true },
{ "path": "CHANGELOG.md", "by_ai": false }
],
"attribution": {
"ai_ratio": 73,
"method": "line",
"lines": { "ai_added": 146, "total_added": 200, "deleted": 12 }
}
}

Claude Code

보통은 line-level 입니다. Agent Note 는 각 AI edit 전후의 file 상태를 비교하고, 나중에 들어간 human edit 를 final diff 에서 다시 빼서 계산합니다.

Codex CLI

처음에는 file-level 입니다. transcript patch count 가 final commit diff 와 맞을 때만 line-level 로 올라갑니다.

Cursor

처음에는 file-level 입니다. edit count 가 맞고 final file 이 마지막 AI edit 와 그대로 같을 때만 line-level 로 올라갑니다.

Gemini CLI

hook 과 transcript parsing 으로 prompt / response 와 file-level attribution 을 기록합니다. line-level 은 아직 없습니다.

📝 Contextcontinue다음 작업으로 넘어가 같은 짧은 prompt 를 읽기 쉽게 만드는 표시 전용 보충 설명입니다. attribution 에는 영향을 주지 않습니다.

Agent Note Dashboard showing Context before a short prompt
  • reference context 는 바로 이전 response 에서 가져옵니다. final diff 에 포함된 file path, file 이름, code identifier 가 언급될 때만 사용합니다.
  • scope context 는 현재 response 에서 가져옵니다. response 초반이 이번 작업 범위를 구체적으로 설명할 때만 사용합니다.
  • Agent Note 는 yes, continue, お願いします 같은 짧은 승인 표현만으로 Context 를 선택하지 않습니다. file 이나 code 에 대한 구체적인 단서가 없으면 Context 를 붙이지 않습니다.
  • Context 는 files_touched, prompt ownership, AI Ratio, attribution method, git note 저장 여부를 절대 바꾸지 않습니다.

Agent Note 와 Entire 는 비슷한 문제를 다루지만 목표 workflow 가 다릅니다.

  • Agent Note 는 git commit 과 그 commit 을 만든 AI 대화를 연결합니다. Entire 는 rewind / resume workflow 를 포함하는 더 넓은 checkpoint product 입니다.
  • Agent Note 의 영구 record 는 refs/notes/agentnote 에 저장되고, 임시 session file 은 .git/agentnote/ 아래에 남습니다. Entire 는 checkpoint metadata 와 hosted web application 을 중심으로 합니다.
  • Agent Note Dashboard 는 git notes 기반의 optional static GitHub Pages 입니다. hosted service 없이도 Agent Note 를 사용할 수 있습니다.
  • Agent Note 는 과거 workspace state 를 복원하려는 tool 이 아닙니다. commit 이 왜 바뀌었는지, 어떤 prompt 가 관련됐는지, diff 중 어느 정도가 AI-authored 인지 review 하기 쉽게 만드는 데 집중합니다.
이벤트발생하는 일
SessionStart세션 디렉터리를 만들고 heartbeat 를 기록
UserPromptSubmitprompt 를 추가하고, turn counter 를 증가시키며, log 를 rotate
PreToolUse Edit/Writepre-edit blob hash 를 동기적으로 캡처
PostToolUse Edit/Writepost-edit blob hash 와 file path 를 캡처
Stopstop event 를 기록함 (heartbeat 는 계속 활성 상태 — Stop = response 끝, session 끝 아님)

Git notes 는 branch 목록, GitHub UI, CI 에서는 보이지 않지만 push / fetch 는 가능합니다.

Terminal window
# 팀과 공유
git push origin refs/notes/agentnote
# remote 에서 가져오기
git fetch origin refs/notes/agentnote:refs/notes/agentnote
# note 보기
git notes --ref=agentnote show <commit>