Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Tests shell out to `node dist/cli.js`, so always build before running tests.

```
Agent hooks โ†’ agent-note hook --agent <name> (stdin JSON) โ†’ .git/agentnote/sessions/<id>/*.jsonl (local temp)
git commit โ†’ prepare-commit-msg injects trailer when session data exists โ†’ post-commit calls agent-note record โ†’ git note written
git commit โ†’ prepare-commit-msg injects trailer when file evidence exists โ†’ post-commit calls agent-note record โ†’ git note written
git push โ†’ pre-push auto-pushes refs/notes/agentnote
agent-note show/log/why โ†’ reads git notes --ref=agentnote
```
Expand Down Expand Up @@ -93,8 +93,8 @@ Gemini-specific event handling:

`agent-note init` installs three git hooks alongside the agent's hook config:

- **`prepare-commit-msg`**: Checks heartbeat freshness (< 1 hour) and recordable session data before injecting an `Agentnote-Session` trailer. `transcript_path` alone is metadata, not recordable data. Skips amends.
- **`post-commit`**: Reads session ID from HEAD's trailer, calls `agent-note record <sid>` to write git note.
- **`prepare-commit-msg`**: Checks heartbeat freshness (< 1 hour) and file evidence (`changes.jsonl` or `pre_blobs.jsonl`) before injecting an `Agentnote-Session` trailer for plain git commits. Prompt-only sessions do not get plain git hook trailers. Agent `PreToolUse git commit` hooks may still inject trailers for prompt-only rescue because the commit command itself came from the agent. Skips amends.
- **`post-commit`**: Reads session ID from HEAD's trailer, calls `agent-note record <sid>` to write git note. If `prepare-commit-msg` marked a long-running session as too stale for trailer injection, it calls `agent-note record --fallback-head`, which records only when a session post-edit blob matches a committed HEAD blob.
- **`pre-push`**: Auto-pushes `refs/notes/agentnote` to remote. Uses `AGENTNOTE_PUSHING` recursion guard.

Existing hooks are backed up and chained. Compatible with husky/lefthook.
Expand Down Expand Up @@ -125,6 +125,7 @@ Each `UserPromptSubmit` increments a turn counter. File changes inherit the curr

- `init` modifies agent config (`.claude/settings.json` for Claude Code, `.codex/` for Codex, `.cursor/hooks.json` for Cursor, `.gemini/settings.json` for Gemini CLI) and installs git hooks (prepare-commit-msg, post-commit, pre-push). Agent config is intended to be committed to git so the team shares the same hooks config.
- `hook` is called by the coding agent at runtime. It never modifies config files.
- Public user installs generate agent hooks that call `npx --yes agent-note hook --agent <name>`. This repository may keep repo-local development hooks that call `node packages/cli/dist/cli.js hook --agent <name>` so local changes can be tested before publishing. Treat `cli.js hook` as a maintainer-only compatibility path, not public setup guidance.

### Harness hooks

Expand Down
7 changes: 4 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Tests shell out to `node dist/cli.js`, so always build before running tests.

```
Agent hooks โ†’ agent-note hook --agent <name> (stdin JSON) โ†’ .git/agentnote/sessions/<id>/*.jsonl (local temp)
git commit โ†’ prepare-commit-msg injects trailer when session data exists โ†’ post-commit calls agent-note record โ†’ git note written
git commit โ†’ prepare-commit-msg injects trailer when file evidence exists โ†’ post-commit calls agent-note record โ†’ git note written
git push โ†’ pre-push auto-pushes refs/notes/agentnote
agent-note show/log/why โ†’ reads git notes --ref=agentnote
```
Expand Down Expand Up @@ -93,8 +93,8 @@ Gemini-specific event handling:

`agent-note init` installs three git hooks alongside the agent's hook config:

- **`prepare-commit-msg`**: Checks heartbeat freshness (< 1 hour) and recordable session data before injecting an `Agentnote-Session` trailer. `transcript_path` alone is metadata, not recordable data. Skips amends.
- **`post-commit`**: Reads session ID from HEAD's trailer, calls `agent-note record <sid>` to write git note.
- **`prepare-commit-msg`**: Checks heartbeat freshness (< 1 hour) and file evidence (`changes.jsonl` or `pre_blobs.jsonl`) before injecting an `Agentnote-Session` trailer for plain git commits. Prompt-only sessions do not get plain git hook trailers. Agent `PreToolUse git commit` hooks may still inject trailers for prompt-only rescue because the commit command itself came from the agent. Skips amends.
- **`post-commit`**: Reads session ID from HEAD's trailer, calls `agent-note record <sid>` to write git note. If `prepare-commit-msg` marked a long-running session as too stale for trailer injection, it calls `agent-note record --fallback-head`, which records only when a session post-edit blob matches a committed HEAD blob.
- **`pre-push`**: Auto-pushes `refs/notes/agentnote` to remote. Uses `AGENTNOTE_PUSHING` recursion guard.

Existing hooks are backed up and chained. Compatible with husky/lefthook.
Expand Down Expand Up @@ -125,6 +125,7 @@ Each `UserPromptSubmit` increments a turn counter. File changes inherit the curr

- `init` modifies agent config (`.claude/settings.json` for Claude Code, `.codex/` for Codex, `.cursor/hooks.json` for Cursor, `.gemini/settings.json` for Gemini CLI) and installs git hooks (prepare-commit-msg, post-commit, pre-push). Agent config is intended to be committed to git so the team shares the same hooks config.
- `hook` is called by the coding agent at runtime. It never modifies config files.
- Public user installs generate agent hooks that call `npx --yes agent-note hook --agent <name>`. This repository may keep repo-local development hooks that call `node packages/cli/dist/cli.js hook --agent <name>` so local changes can be tested before publishing. Treat `cli.js hook` as a maintainer-only compatibility path, not public setup guidance.

### Harness hooks

Expand Down
6 changes: 3 additions & 3 deletions README.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ Die root action hat zwei Modi:
PR Report Mode ist der Standard:

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Expand All @@ -291,7 +291,7 @@ Setze `prompt_detail` auf `compact` oder `full`, wenn du die Prompt-Historie fok
Dashboard Mode nutzt dieselbe action mit `dashboard: true`:

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
with:
dashboard: true
prompt_detail: compact
Expand All @@ -313,7 +313,7 @@ Wenn Sie bereits eine GitHub Pages Site haben, finden Sie die sichere kombiniert
<summary>Full example with outputs</summary>

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
id: agent-note
with:
base: main
Expand Down
6 changes: 3 additions & 3 deletions README.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ La root action tiene dos modos:
PR Report Mode es el predeterminado:

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Expand All @@ -291,7 +291,7 @@ Configura `prompt_detail` como `compact` o `full` cuando quieras un historial de
Dashboard Mode usa la misma action con `dashboard: true`:

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
with:
dashboard: true
prompt_detail: compact
Expand All @@ -313,7 +313,7 @@ Si ya tienes un sitio GitHub Pages, consulta la [documentaciรณn Dashboard](https
<summary>Full example with outputs</summary>

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
id: agent-note
with:
base: main
Expand Down
6 changes: 3 additions & 3 deletions README.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ L'action racine a deux modes:
PR Report Mode est le mode par dรฉfaut:

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Expand All @@ -291,7 +291,7 @@ Dรฉfinissez `prompt_detail` sur `compact` ou `full` pour obtenir un historique d
Dashboard Mode utilise la mรชme action avec `dashboard: true`:

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
with:
dashboard: true
prompt_detail: compact
Expand All @@ -313,7 +313,7 @@ Si vous avez dรฉjร  un Site GitHub Pages, consultez les [docs Dashboard](https:/
<summary>Full example with outputs</summary>

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
id: agent-note
with:
base: main
Expand Down
6 changes: 3 additions & 3 deletions README.id.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ Root action punya dua mode:
PR Report Mode adalah default:

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Expand All @@ -291,7 +291,7 @@ Atur `prompt_detail` ke `compact` atau `full` jika ingin riwayat Prompt yang fok
Dashboard Mode memakai action yang sama dengan `dashboard: true`:

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
with:
dashboard: true
prompt_detail: compact
Expand All @@ -313,7 +313,7 @@ Jika Anda sudah punya GitHub Pages Site, lihat [Dashboard Docs](https://wasabeef
<summary>Full example with outputs</summary>

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
id: agent-note
with:
base: main
Expand Down
6 changes: 3 additions & 3 deletions README.it.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ La root action ha due mode:
PR Report Mode รจ il default:

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Expand All @@ -291,7 +291,7 @@ Imposta `prompt_detail` su `compact` o `full` quando vuoi una cronologia dei Pro
Dashboard Mode usa la stessa action con `dashboard: true`:

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
with:
dashboard: true
prompt_detail: compact
Expand All @@ -313,7 +313,7 @@ Se hai giร  un sito GitHub Pages, consulta le [Dashboard Docs](https://wasabeef.
<summary>Full example with outputs</summary>

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
id: agent-note
with:
base: main
Expand Down
6 changes: 3 additions & 3 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ root action ใซใฏ 2 ใคใฎ mode ใŒใ‚ใ‚Šใพใ™ใ€‚
PR Report Mode ใŒๆ—ขๅฎšใงใ™ใ€‚

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Expand All @@ -291,7 +291,7 @@ Prompt ๅฑฅๆญดใ‚’็ตžใ‚‹ใ€ใพใŸใฏๅ…จไปถ่กจ็คบใ™ใ‚‹ๅ ดๅˆใฏ `prompt_detail`
Dashboard Mode ใฏๅŒใ˜ action ใซ `dashboard: true` ใ‚’ๆธกใ—ใพใ™ใ€‚

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
with:
dashboard: true
prompt_detail: compact
Expand All @@ -313,7 +313,7 @@ npx agent-note init --agent claude --dashboard
<summary>Full example with outputs</summary>

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
id: agent-note
with:
base: main
Expand Down
6 changes: 3 additions & 3 deletions README.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ root action ์—๋Š” ๋‘ ๊ฐ€์ง€ mode ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.
PR Report Mode ๊ฐ€ ๊ธฐ๋ณธ๊ฐ’์ž…๋‹ˆ๋‹ค.

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Expand All @@ -291,7 +291,7 @@ Prompt ๊ธฐ๋ก์„ ํ•ต์‹ฌ ์ค‘์‹ฌ์œผ๋กœ ๋ณด๊ฑฐ๋‚˜ ์ „์ฒด๋กœ ๋ณด๋ ค๋ฉด `prompt_detai
Dashboard Mode ๋Š” ๊ฐ™์€ action ์— `dashboard: true` ๋ฅผ ์ „๋‹ฌํ•ฉ๋‹ˆ๋‹ค.

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
with:
dashboard: true
prompt_detail: compact
Expand All @@ -313,7 +313,7 @@ npx agent-note init --agent claude --dashboard
<summary>Full example with outputs</summary>

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
id: agent-note
with:
base: main
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ The root action has two modes:
PR Report Mode is the default:

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Expand All @@ -291,7 +291,7 @@ Set `prompt_detail` to `compact` or `full` when you want a focused or complete p
Dashboard Mode uses the same action with `dashboard: true`:

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
with:
dashboard: true
prompt_detail: compact
Expand All @@ -313,7 +313,7 @@ If you already have a GitHub Pages site, see [Dashboard docs](https://wasabeef.g
<summary>Full example with outputs</summary>

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
id: agent-note
with:
base: main
Expand Down
6 changes: 3 additions & 3 deletions README.pt-br.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ A root action tem dois modes:
PR Report Mode รฉ o default:

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Expand All @@ -291,7 +291,7 @@ Defina `prompt_detail` como `compact` ou `full` quando quiser um histรณrico de P
Dashboard Mode usa a mesma action com `dashboard: true`:

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
with:
dashboard: true
prompt_detail: compact
Expand All @@ -313,7 +313,7 @@ Se vocรช jรก tem um Site GitHub Pages, veja a configuraรงรฃo combinada segura na
<summary>Full example with outputs</summary>

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
id: agent-note
with:
base: main
Expand Down
6 changes: 3 additions & 3 deletions README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ Agent Note ะทะฐะฟะธัั‹ะฒะฐะตั‚ Git Note ะดะปั ัั‚ะพะณะพ Commit
PR Report Mode ะธัะฟะพะปัŒะทัƒะตั‚ัั ะฟะพ ัƒะผะพะปั‡ะฐะฝะธัŽ:

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Expand All @@ -291,7 +291,7 @@ PR Report Mode ะธัะฟะพะปัŒะทัƒะตั‚ัั ะฟะพ ัƒะผะพะปั‡ะฐะฝะธัŽ:
Dashboard Mode ะธัะฟะพะปัŒะทัƒะตั‚ ั‚ัƒ ะถะต action ั `dashboard: true`:

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
with:
dashboard: true
prompt_detail: compact
Expand All @@ -313,7 +313,7 @@ npx agent-note init --agent claude --dashboard
<summary>Full example with outputs</summary>

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
id: agent-note
with:
base: main
Expand Down
6 changes: 3 additions & 3 deletions README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ root action ๆœ‰ไธค็ง mode๏ผš
PR Report Mode ๆ˜ฏ้ป˜่ฎคๅ€ผ๏ผš

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Expand All @@ -291,7 +291,7 @@ PR Report Mode ๆ˜ฏ้ป˜่ฎคๅ€ผ๏ผš
Dashboard Mode ไฝฟ็”จๅŒไธ€ไธช action๏ผŒๅนถไผ ๅ…ฅ `dashboard: true`๏ผš

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
with:
dashboard: true
prompt_detail: compact
Expand All @@ -313,7 +313,7 @@ npx agent-note init --agent claude --dashboard
<summary>Full example with outputs</summary>

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
id: agent-note
with:
base: main
Expand Down
6 changes: 3 additions & 3 deletions README.zh-tw.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ root action ๆœ‰ๅ…ฉ็จฎ mode๏ผš
PR Report Mode ๆ˜ฏ้ ่จญๅ€ผ๏ผš

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Expand All @@ -291,7 +291,7 @@ PR Report Mode ๆ˜ฏ้ ่จญๅ€ผ๏ผš
Dashboard Mode ไฝฟ็”จๅŒไธ€ๅ€‹ action๏ผŒไธฆๅ‚ณๅ…ฅ `dashboard: true`๏ผš

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
with:
dashboard: true
prompt_detail: compact
Expand All @@ -313,7 +313,7 @@ npx agent-note init --agent claude --dashboard
<summary>Full example with outputs</summary>

```yaml
- uses: wasabeef/AgentNote@v0
- uses: wasabeef/AgentNote@v1
id: agent-note
with:
base: main
Expand Down
Loading
Loading